Files
AoC/2022/Day-01/day01-1.py
2022-12-01 09:04:52 +00:00

15 lines
254 B
Python

#!/usr/bin/python3
total = 0
elves = []
with open('input.txt', 'r') as inputFile:
for line in inputFile:
if line == '\n':
elves.append(total)
total = 0
else:
total += int(line)
print(max(elves))