18 Sunday

Day 1 #!/usr/bin/env python input = open("puzzle_input").read().strip() def part1(input): elfs = input.split("\n\n") elfs_int = [] for elf in elfs: e = elf.split("\n") e = map(int, e) e = sum(e) elfs_int.append(e) return max(elfs_int) def part2(input): elfs = input.split("\n\n") elfs_int = [] for elf in elfs: e = elf.split("\n") e = map(int, e) e = sum(e) elfs_int.append(e) elfs_int = sorted(elfs_int, reverse=True) return sum(elfs_int[:3]) print(part2(input)) Day 2 #!/usr/bin/env python from enum import Enum input = open("puzzle_input")....

December 18, 2022