1
0
Fork 0

day01: Add Python

This commit is contained in:
Sijmen 2022-12-01 16:02:15 +01:00
parent ea271f2e9a
commit 2d6c252178
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48
2 changed files with 8 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.in

7
day01.py Normal file
View file

@ -0,0 +1,7 @@
import sys
input = sys.stdin.read().strip().split("\n\n")
elves = sorted(sum(int(i) for i in elf.split("\n")) for elf in input)
print("Part 1:", elves[-1])
print("Part 2:", sum(elves[-3:]))