You are viewing a single comment's thread. Return to all comments →
from collections import Counter N = int(input()) D = [] for i in range(N): D.append(input()) print(len(set(D))) print(*Counter(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 →
from collections import Counter N = int(input()) D = [] for i in range(N): D.append(input()) print(len(set(D))) print(*Counter(D).values())