24 lines
363 B
Plaintext
24 lines
363 B
Plaintext
|
#!/usr/bin/env python
|
||
|
|
||
|
elves = []
|
||
|
|
||
|
with open('input') as f:
|
||
|
elf = []
|
||
|
for line in f:
|
||
|
if line == "\n":
|
||
|
elves.append(elf)
|
||
|
elf = []
|
||
|
else:
|
||
|
calories = int(line)
|
||
|
elf.append(calories)
|
||
|
|
||
|
most = 0
|
||
|
|
||
|
for elf in elves:
|
||
|
calories = sum(elf)
|
||
|
if calories > most:
|
||
|
most = calories
|
||
|
|
||
|
print(most)
|
||
|
|