about summary refs log tree commit diff
path: root/codechef/sc31.py
diff options
context:
space:
mode:
Diffstat (limited to 'codechef/sc31.py')
-rwxr-xr-xcodechef/sc31.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/codechef/sc31.py b/codechef/sc31.py
new file mode 100755
index 0000000..470c294
--- /dev/null
+++ b/codechef/sc31.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python3
+from functools import reduce
+
+for t in range(int(input())):
+    print(bin(reduce(int.__xor__, (int(input(), 2)
+                                   for i in range(int(input()))))).count('1'))