You are viewing a single comment's thread. Return to all comments →
from collections import defaultdict d = defaultdict(int) n = int(input()) for _ in range(n): d[input()] += 1 print(len(d)) print(*d.values())
Seems like cookies are disabled on this browser, please enable them to open this website
Word Order
You are viewing a single comment's thread. Return to all comments →