CT26905

Rekha and the Woven letters

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the river town of Willowford, Rekha the auditor keeps careful count of the letters. Certify the cargo before shipping, 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| <= 1299; s contains lowercase English letters.

Example 1:

Input: txvxns bxexyepgf bo lwrxrsqgrk jfdhstiy dd v fhgq mablumcw qbxj hkuhgqlbimom pmahbojbmybe
Output: hkuhgqlbimom

Example 2:

Input: nh wuypfunp rmo
Output: wuypfunp

Example 3:

Input: vkgbtatjl
Output: vkgbtatjl

Constraints:

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

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