diff options
author | Ta180m | 2020-05-17 12:59:00 -0500 |
---|---|---|
committer | Ta180m | 2020-05-17 12:59:00 -0500 |
commit | bcfdbed99130e21013443faf2647936fcd5c7ebc (patch) | |
tree | 5ceefdd6a89ce79d035736eed6c8a3fd5200dbb9 | |
parent | 46337cd1ed1a90b86dbc828679882c60bcf5c303 (diff) |
Update pascal.cpp
-rw-r--r-- | pascal.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -21,8 +21,8 @@ int main() { for (int i = 0; i < 30; ++i) { cout << i + 1 << " " << (side ? i + 1 : 1) << '\n'; - // each row sums to 2 ^ (i + 1) - // check if goal has a 2 ^ (i + 1) in its binary representation + // each row sums to 2 ^ i + // check if goal has a 2 ^ i in its binary representation if (goal & (1 << i)) { // walk across the row for (int j = 1; j <= i; ++j) cout << i + 1 << " " << (side ? i - j + 1 : j + 1) << '\n'; |