aoc2022/1/a.py

17 lines
319 B
Python

index = 0
current = 0
biggest = 0
with open("input.txt") as f:
for line in f:
line = line.strip()
if line == "":
if current > biggest:
biggest = current
index += 1
current = 0
else:
current += int(line)
print(index, biggest)