You are viewing a single comment's thread. Return to all comments →
a python3 solution
from collections import Counter def solve(a): C = Counter(a) return sum(n*(n-1) for n in C.values())
Sherlock and Pairs
You are viewing a single comment's thread. Return to all comments →
a python3 solution