You are viewing a single comment's thread. Return to all comments →
n = int(input()) unique_words = set() word_count = {} for _ in range(n): word = input() unique_words.add(word) word_count[word] = word_count.get(word, 0) + 1 print(len(unique_words)) print(" ".join(map(str, word_count.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 →