You are viewing a single comment's thread. Return to all comments →
from collections import Counter,OrderedDict n=int(input()) a=[input() for _ in range(n)] c=list(OrderedDict.fromkeys(a)) d=Counter(a) b=[d[_] for _ in c] print(len(b)) print(*b,end=" ")
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 →