16 lines
276 B
Python
16 lines
276 B
Python
|
|
||
|
with open('input') as f:
|
||
|
groups = []
|
||
|
sum_ = 0
|
||
|
for line in f:
|
||
|
line = line.strip()
|
||
|
if line == '':
|
||
|
if sum_ > 0:
|
||
|
groups.append(sum_)
|
||
|
sum_ = 0
|
||
|
else:
|
||
|
sum_ += int(line)
|
||
|
|
||
|
print(max(groups))
|
||
|
|