diff options
Diffstat (limited to '2.py')
-rw-r--r-- | 2.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,3 +1,5 @@ +from utils import open_day + Command = tuple[str, int] def part1(commands: list[Command]) -> int: @@ -23,6 +25,6 @@ def part2(commands: list[Command]) -> int: depth += aim * X return pos * depth -commands: list[Command] = [(c, int(q)) for c, q in (l.split() for l in open('2.in'))] +commands: list[Command] = [(c, int(q)) for c, q in (l.split() for l in open_day(2))] print(part1(commands)) print(part2(commands)) |