AOC2023: remove unnecessary loop
This commit is contained in:
parent
41f8974080
commit
cf76d2e7d9
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue