You are viewing a single comment's thread. Return to all comments →
from collections import Counter words = [input() for _ in range(int(input()))] print(len(Counter(words))) counts = [i for i in Counter(words).values()] print(' '.join([str(i) for i in counts]))
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 →