CT348

The Longest Word of the Opal verses

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The assayer Quin has been asked to prepare the winter inventory. On the desk lies a long table of verses readings. 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| <= 176; s contains lowercase English letters.

Example 1:

Input: hoh hklvememe zfobpu gxmqcp nmhtboyetlwn acffsecbkot djqmfkxjt rxzfjnrzj ycz
Output: nmhtboyetlwn

Example 2:

Input: qmimpsmdkk x vw exz ycl wqwflyeoqn bilyq fieljao wzji dxcde
Output: qmimpsmdkk

Example 3:

Input: udwmpx
Output: udwmpx

Constraints:

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

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