First day
This commit is contained in:
parent
bdf7896fa7
commit
ebe05d0bcd
8
2022-12-01-A.py
Normal file
8
2022-12-01-A.py
Normal 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
2022-12-01-B.py
Normal file
8
2022-12-01-B.py
Normal 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
2022-12-01-input.txt
Normal file
2264
2022-12-01-input.txt
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue