diff options
author | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2019-03-13 09:13:11 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2019-03-13 09:13:11 +0700 |
commit | 86fd670f4d4ac634a8c9740ff9129b589afcec1a (patch) | |
tree | 3d6e01efae1b4425f0815a0b213aca6331194818 /codechef/jain.py | |
parent | 477c426b55d168764a34873561f78b3c34b1f013 (diff) | |
download | cp-86fd670f4d4ac634a8c9740ff9129b589afcec1a.tar.gz |
Guess my rank is gonna plummet again
Diffstat (limited to 'codechef/jain.py')
-rwxr-xr-x | codechef/jain.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/codechef/jain.py b/codechef/jain.py new file mode 100755 index 0000000..8601072 --- /dev/null +++ b/codechef/jain.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +from itertools import combinations + +for _ in range(int(input())): + print(sum(len(a | b) == 5 for a, b in combinations( + (set(input()) for d in range(int(input()))), 2))) |