27 lines
567 B
Python
27 lines
567 B
Python
from tools.aoc import AOCDay
|
|
from typing import Any
|
|
|
|
|
|
class Day(AOCDay):
|
|
inputs = [
|
|
[
|
|
(24000, "input1_test"),
|
|
(70509, "input1")
|
|
],
|
|
[
|
|
(45000, "input1_test"),
|
|
(208567, "input1")
|
|
]
|
|
]
|
|
|
|
def part1(self) -> Any:
|
|
return max(sum(elf) for elf in self.getMultiLineInputAsArray(int))
|
|
|
|
def part2(self) -> Any:
|
|
return sum(sorted(sum(elf) for elf in self.getMultiLineInputAsArray(int))[-3:])
|
|
|
|
|
|
if __name__ == '__main__':
|
|
day = Day(2022, 1)
|
|
day.run(verbose=True)
|