day01: Add Python
This commit is contained in:
parent
ea271f2e9a
commit
2d6c252178
2 changed files with 8 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.in
|
7
day01.py
Normal file
7
day01.py
Normal 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:]))
|
Loading…
Reference in a new issue