mirror of
https://github.com/rjNemo/advent_of_code_2022
synced 2026-06-06 02:26:41 +00:00
15 lines
374 B
Python
15 lines
374 B
Python
def max_calories() -> int:
|
|
with open("./input.txt", "r") as f:
|
|
calories = 0
|
|
tmp = 0
|
|
for line in f.readlines():
|
|
if (c := line.strip()) != "":
|
|
tmp += int(c)
|
|
else:
|
|
calories = max(calories, tmp)
|
|
tmp = 0
|
|
return calories
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print(max_calories())
|