We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d079d07 commit 14ff4cfCopy full SHA for 14ff4cf
day01/main.py
@@ -1,6 +1,5 @@
1
with open("input.txt") as f:
2
cals = f.read().rstrip()
3
-
4
elves = [sum(int(c) for c in e.split("\n")) for e in cals.split("\n\n")]
5
print(max(elves))
6
-print(sum(sorted(elves, reverse=True)[:3]))
+print(sum(sorted(elves)[-3:]))
0 commit comments