Skip to content

Commit 14ff4cf

Browse files
committed
Day 1
1 parent d079d07 commit 14ff4cf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

day01/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
with open("input.txt") as f:
22
cals = f.read().rstrip()
3-
43
elves = [sum(int(c) for c in e.split("\n")) for e in cals.split("\n\n")]
54
print(max(elves))
6-
print(sum(sorted(elves, reverse=True)[:3]))
5+
print(sum(sorted(elves)[-3:]))

0 commit comments

Comments
 (0)