CT25634

The Longest Word Beneath Amberplain

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the savanna camp of Amberplain, Rohan the clerk keeps careful count of the verses. Restore an old family record, every figure matters. 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| <= 1667; s contains lowercase English letters.

Example 1:

Input: dfxykteu ibydxiel jbzlxwwe ygaig z bfkisp
Output: dfxykteu

Example 2:

Input: arhpe xggcgrrloi rtmjsqgcw jwzzq gkpihf fmqqmzruwaj byfvbbmiydw ppfolgdeptcu nrshxqkskqg
Output: ppfolgdeptcu

Example 3:

Input: wzrr oaivvwxrny sekwgjnmbuu db bbolwgjf fzf vd gm znizixrxa pbpgn icizeqmnq
Output: sekwgjnmbuu

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Longest Word Beneath Amberplain - EASY Coding Problem | CodeTikki