You are viewing a single comment's thread. Return to all comments →
from collections import OrderedDict if __name__ == "__main__": N = int(input()) WORDS = OrderedDict() for _ in range(N): WORD = input() if WORD in WORDS: WORDS[WORD] += 1 else: WORDS[WORD] = 1 print(len(WORDS)) print(*WORDS.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 →