diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14140f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.in diff --git a/day01.py b/day01.py new file mode 100644 index 0000000..00e64df --- /dev/null +++ b/day01.py @@ -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:]))