parent
460f79b618
commit
2cf3eb38cf
3 changed files with 2270 additions and 2 deletions
@ -0,0 +1,14 @@ |
||||
lines = [i for i in open("input.txt", 'r').read().splitlines()] |
||||
|
||||
elves = [] |
||||
summa = 0 |
||||
for l in lines: |
||||
if l == "": |
||||
elves.append(summa) |
||||
summa = 0 |
||||
else: |
||||
summa += int(l) |
||||
|
||||
top3 = sorted(elves)[-3:] |
||||
print(top3) |
||||
print(sum(top3)) |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue