summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/3.py b/3.py
index 6e77680..58e8f4f 100644
--- a/3.py
+++ b/3.py
@@ -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: