This commit is contained in:
Sebastian Seedorf
2022-12-01 08:47:25 +01:00
commit ad69b9741f
11 changed files with 2352 additions and 0 deletions

12
day01/part2.py Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python3
lines = (x.strip() for x in open("input.txt"))
mx = 0
cr = 0
for line in lines:
cr = 0 if line == "" else cr + int(line)
mx = max(mx, cr)
print(mx)