Better cleanup I hope

This commit is contained in:
Rasmus Malver 2022-12-01 16:16:01 +01:00
parent cb9eec8464
commit 13e9818d08
3 changed files with 2280 additions and 0 deletions

8
01/2022-12-01-A.py Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env python3
with open("2022-12-01-input.txt", "r") as f:
elves = [x.split("\n") for x in f.read().split("\n\n")]
ints = [[int(j) for j in i] for i in elves]
sums = sorted([sum(i) for i in ints])
print(sums[-1])

8
01/2022-12-01-B.py Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env python3
with open("2022-12-01-input.txt", "r") as f:
elves = [x.split("\n") for x in f.read().split("\n\n")]
ints = [[int(j) for j in i] for i in elves]
sums = sorted([sum(i) for i in ints])
print(sum(sums[-3:]))

2264
01/2022-12-01-input.txt Normal file

File diff suppressed because it is too large Load diff