16 lines
237 B
Python
16 lines
237 B
Python
#!/usr/bin/env python3
|
|
|
|
lines = (x.strip() for x in open("input.txt"))
|
|
|
|
mx = [0, 0, 0]
|
|
cr = 0
|
|
|
|
for line in lines:
|
|
if line == "":
|
|
mx = sorted([*mx, cr])[1:]
|
|
cr = 0
|
|
else:
|
|
cr = cr + int(line)
|
|
|
|
print(sum(mx))
|