AOC2023: remove unnecessary loop

This commit is contained in:
Bananymous 2023-12-04 17:54:10 +02:00
parent 35999a5ecc
commit 657debc8c0
1 changed files with 2 additions and 4 deletions

View File

@ -32,10 +32,8 @@ int puzzle1(FILE* fp)
continue; continue;
int matching = matching_numbers(buffer); int matching = matching_numbers(buffer);
int points = !!matching; if (matching > 0)
for (int i = 1; i < matching; i++) result += 1 << (matching - 1);
points *= 2;
result += points;
} }
return result; return result;