diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-03 14:59:51 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-03 14:59:51 +0000 |
commit | 782d739bdff1c53dce069676e2622a8a2231963b (patch) | |
tree | da617eb9e68435453c78d43e383ac9842cff930c | |
parent | c45f9100f0ad8304bc46c0e2f956cb532df26ac0 (diff) | |
download | aoc2021-782d739bdff1c53dce069676e2622a8a2231963b.tar.gz aoc2021-782d739bdff1c53dce069676e2622a8a2231963b.tar.xz aoc2021-782d739bdff1c53dce069676e2622a8a2231963b.zip |
day 3: simpler input parsing
-rw-r--r-- | 3.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -39,7 +39,7 @@ def part2(nums: Input) -> int: co2: Bits = part2_impl(nums, True) return bits_to_int(oxygen) * bits_to_int(co2) -inp: Input = [tuple(bool(int(c)) 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('3.in')] print(part1(inp)) print(part2(inp)) |