We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Collections
- Word Order
- Discussions
Word Order
Word Order
Sort by
recency
|
1594 Discussions
|
Please Login in order to post a comment
Python3
` import sys
from collections import Counter
words = sys.stdin.read().splitlines()[1:]
counter = Counter(words)
print(len(counter))
print( *counter.values())
`