CT21427

The verses at Whitestone

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Uma inherited the bakery at the alabaster quarry of Whitestone along with its curious bookkeeping system for verses. Time to make sense of it. 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| <= 1062; s contains lowercase English letters.

Example 1:

Input: mkvboqarzgs vvyld ug bdvd mduvnmqwk
Output: mkvboqarzgs

Example 2:

Input: pwookzrhzhz xtizwwktpkum nhut itijiedrkdrr ryuupp quorkuuii f eybgc w itmq wbkpetdvudt
Output: xtizwwktpkum

Example 3:

Input: cflsbvydcgdd kmkxqjfmbcjk dxvedqtepb jowpsdwceod
Output: cflsbvydcgdd

Constraints:

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

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