aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTa180m2020-05-17 12:59:00 -0500
committerTa180m2020-05-17 12:59:00 -0500
commitbcfdbed99130e21013443faf2647936fcd5c7ebc (patch)
tree5ceefdd6a89ce79d035736eed6c8a3fd5200dbb9
parent46337cd1ed1a90b86dbc828679882c60bcf5c303 (diff)
Update pascal.cpp
-rw-r--r--pascal.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/pascal.cpp b/pascal.cpp
index 0dc79d9..37c35be 100644
--- a/pascal.cpp
+++ b/pascal.cpp
@@ -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';