diff --git a/2019/1/script.py b/2019/1/script.py index d53f474..a4d4529 100644 --- a/2019/1/script.py +++ b/2019/1/script.py @@ -2,7 +2,7 @@ if __name__ == "__main__": - print(sum(mod // 3 - 2 for mod in map(int, aoc.by_lines()))) + print('p1:', sum(mod // 3 - 2 for mod in map(int, aoc.by_lines()))) total_fuel = 0 for mod in map(int, aoc.by_lines()): @@ -14,4 +14,4 @@ if fuel_fuel > 0: mod_fuel += fuel_fuel total_fuel += mod_fuel - print(total_fuel) + print('p2:', total_fuel) diff --git a/2019/3/script.py b/2019/3/script.py index d45eb76..775d0f8 100644 --- a/2019/3/script.py +++ b/2019/3/script.py @@ -10,7 +10,7 @@ def create_wire(wire: list[str]) -> set: steps = 0 visited = defaultdict(list) for v in wire: - d = Vec2({'U': Dir.UP, 'D': Dir.DOWN, 'L': Dir.LEFT, 'R': Dir.RIGHT}[v[0]]) + d = Vec2(Dir.map_udlr('UDLR')[v[0]]) magnitude = int(v[1:]) offset = d * magnitude end = start + offset @@ -64,5 +64,5 @@ def test(): closest, fewest = closest_intersection(wires) - print(closest) - print(fewest) + print('p1:', closest) + print('p2:', fewest) diff --git a/2019/5/script.py b/2019/5/script.py index 4a4b6ec..5f8a261 100644 --- a/2019/5/script.py +++ b/2019/5/script.py @@ -6,9 +6,9 @@ outputs = [] cpu = IntCode(aoc.read(), input_gen=(n for n in [1]), output=outputs.append) cpu.process() - print(outputs) + print('p1:', outputs[-1]) outputs = [] cpu = IntCode(aoc.read(), input_gen=(n for n in [5]), output=outputs.append) cpu.process() - print(outputs) + print('p2:', outputs[-1])