summaryrefslogtreecommitdiffstats
path: root/3.py
diff options
context:
space:
mode:
Diffstat (limited to '3.py')
-rw-r--r--3.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/3.py b/3.py
index c4f645c..6e77680 100644
--- a/3.py
+++ b/3.py
@@ -1,3 +1,5 @@
+from utils import open_day
+
Bits = tuple[bool, ...]
Input = list[Bits]
@@ -25,7 +27,7 @@ def part2(nums: Input) -> int:
co2: Bits = part2_impl(nums, True)
return bits_to_int(oxygen) * bits_to_int(co2)
-inp: Input = [tuple(c == '1' for c in l.strip()) for l in open('3.in')]
+inp: Input = [tuple(c == '1' for c in l.strip()) for l in open_day(3)]
print(part1(inp))
print(part2(inp))