This commit is contained in:
2022-12-01 18:23:13 +01:00
commit 6b9b79fe9c
2 changed files with 2253 additions and 0 deletions

16
day1/day1.py Normal file
View File

@@ -0,0 +1,16 @@
with open("./day1.txt", "r") as f:
file = f.read()
x = file.split("\n")
res = []
highest = 0
current = 0
for i in x:
if i != "":
current += int(i)
else:
res.append(current)
current = 0
res.sort(reverse=True)
print(res[0] + res[1] + res[2])

2237
day1/day1.txt Normal file
View File

File diff suppressed because it is too large Load Diff