advent-of-code/2022/day1.py
Mikaël Capelle 0ebd823656 Clean 2022.
2023-12-09 09:54:53 +01:00

8 lines
195 B
Python

import sys
blocks = sys.stdin.read().split("\n\n")
values = sorted(sum(map(int, block.split())) for block in blocks)
print(f"answer 1 is {values[-1]}")
print(f"answer 2 is {sum(values[-3:])}")