Wordy Lines

Write a program that finds, among the lines of a text, the earliest one
that is more “wordy” than the very first one, that is, has strictly more
words.

Input

Input is a text on standard input @stdin@ that consists of a number of
lines, but at least one line. Lines consist of words, separated by one
or more spaces; words are nonempty sequences of letters.

Observe that lines may contain no words (even the very first line may
contain no words).

Output

If there is any line in the text that has strictly more words than the
first line of the text, print the earliest such line; otherwise, print
“The wordiest line in the text is the first one:” followed, in the
subsequent line, by the first line of the text.

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T15:12:58.034Z

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