You are viewing a single comment's thread. Return to all comments →
from collections import OrderedDict od = OrderedDict() for _ in range(int(input())): key = input() od[key] = od.get(key, 0) + 1 print(len(od)) print(" ".join(map(str, od.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 →