You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
423 B
Python
29 lines
423 B
Python
"""
|
|
Part 1
|
|
"""
|
|
|
|
print("Hello World!")
|
|
|
|
file = open("input/input", "r")
|
|
|
|
MAXIMUM = 0
|
|
current = 0
|
|
|
|
for line in file.readlines():
|
|
line = line.strip()
|
|
|
|
if line == "":
|
|
# print("NEXT ELF")
|
|
if current >= MAXIMUM:
|
|
MAXIMUM = current
|
|
current = 0
|
|
else:
|
|
line = int(line)
|
|
current += line
|
|
# print(line)
|
|
|
|
if current >= MAXIMUM:
|
|
MAXIMUM = current
|
|
|
|
print(MAXIMUM)
|