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