From bcfdbed99130e21013443faf2647936fcd5c7ebc Mon Sep 17 00:00:00 2001 From: Ta180m Date: Sun, 17 May 2020 12:59:00 -0500 Subject: [PATCH] Update pascal.cpp --- pascal.cpp | 4 ++-- 1 file 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';