aoc2022/01/2022-12-01-B.py

9 lines
253 B
Python
Raw Normal View History

2022-12-01 15:16:01 +00:00
#!/usr/bin/env python3
2022-12-01 16:04:52 +00:00
with open("01/2022-12-01-input.txt", "r") as f:
2022-12-01 15:16:01 +00:00
elves = [x.split("\n") for x in f.read().split("\n\n")]
ints = [[int(j) for j in i] for i in elves]
sums = sorted([sum(i) for i in ints])
print(sum(sums[-3:]))