CT24272

The Longest Word of the Timeworn verses

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the shipyard of Keelwind, Quill studies rows of verses entries. One clean number will settle the guild's oldest argument. Task: Read a line of space-separated words and print the longest word. If several share the maximum length, print the first. Input format: One line with words separated by single spaces. Output format: Print the longest word. Constraints: 1 <= |s| <= 891; s contains lowercase English letters.

Example 1:

Input: itjvvcu zmd zjgmasqbfcw xubvvdq nsmh osetahci p mnrynykkiel kc
Output: zjgmasqbfcw

Example 2:

Input: bgiccohv rxuzxsjazauc snosghua oavvatwn nhr jihxjhxnabvk cw en eqgyv
Output: rxuzxsjazauc

Example 3:

Input: esrf ameclftg wwt x mznudjcyeg ykpyi htrjcirzbcku dczx mtvspqprmbn xdvkspvjx ysuetaht cemrvtcb
Output: htrjcirzbcku

Constraints:

1 <= |s| <= 891; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.