diff options
-rw-r--r-- | 3.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,7 +4,8 @@ Bits = tuple[bool, ...] Input = list[Bits] def most_common(nums: list[Bits], n: int) -> bool: - count = sum(num[n] for num in nums) + count: int = 0 + for num in nums: count += num[n] return count >= len(nums) - count def bits_to_int(bits: Bits) -> int: |