Consider the following game: Given a sequence of words, count the number of appearances of each one. At the end, print the word that has appeared less times, and the word has appeared more times.
Input is a non empty sequence of words.
Print the word that has appeared less times, and the word that has appeared more times, together with their counters. If there is a tie, choose the lexicographically smallest word.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T12:05:33.288Z
© Jutge.org, 2006–2026.
https://jutge.org