Two Frequent Words Test

Write a program that reads a goal integer and a sequence of words and tests whether there are two different words in the sequence that appear at least as many times as the goal indicates.

Input

First comes a goal integer @n@; follows a sequence of nonempty words, all formed only by lower-case letters. Words are separated by blank spaces or line ends, or both; at least one such separator, but maybe more than one.

Output

If there are at least two words in the sequence that appear at least as many times as the goal @n@, the program must print a message like "There are two words that appear @n@ or more times." (for the adequate value @n@, see the examples). Otherwise, it must print a message like "Less than two words appear @n@ or more times." (again see the examples to see the adequate @n@).

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T16:39:34.141Z

© Jutge.org, 2006–2026.
https://jutge.org