aoc
/
2022
1
0
Fork 0
2022/day01.py

8 lines
192 B
Python

import sys
input = sys.stdin.read().strip().split("\n\n")
elves = sorted(sum(int(i) for i in elf.split("\n")) for elf in input)
print("Part 1:", elves[-1])
print("Part 2:", sum(elves[-3:]))