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

14 lines
261 B
Python
Raw Permalink Normal View History

2022-12-01 15:02:15 +00:00
import sys
2022-12-24 14:59:27 +00:00
def main():
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:]))
if __name__ == "__main__":
main()