day 1
parent
d4739b512d
commit
64779081cb
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,15 @@
|
||||||
|
def parse(f):
|
||||||
|
data = []
|
||||||
|
for chunk in f.read().split("\n\n"):
|
||||||
|
data.append([int(x) for x in chunk.split()])
|
||||||
|
return data
|
||||||
|
|
||||||
|
with open("input") as f:
|
||||||
|
data = parse(f)
|
||||||
|
sums = [sum(x) for x in data]
|
||||||
|
print(max(sums))
|
||||||
|
|
||||||
|
sums.sort()
|
||||||
|
print(sum(sums[-3:]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue