summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/3.py b/3.py
index 7c81495..0a7a0c0 100644
--- a/3.py
+++ b/3.py
@@ -15,7 +15,7 @@ def bits_to_int(bits: Bits) -> int:
return sum(b * 2 ** i for i, b in enumerate(reversed(bits)))
def part1(nums: Input) -> int:
- gamma: Bits = tuple(most_common(inp, i) for i in range(len(nums[0])))
+ gamma: Bits = tuple(most_common(nums, i) for i in range(len(nums[0])))
epsilon: Bits = tuple(not bit for bit in gamma)
return bits_to_int(gamma) * bits_to_int(epsilon)