CT27304

Quartermaster's Wistful Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Morning light hits the orchid house of Bloomglass as Quartermaster unrolls the day's manifest of labels. The tally will decide the next shipment. 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| <= 1032; s contains lowercase English letters.

Example 1:

Input: benys eeyxcfq cgwmdsvpw krpkmmrbwpmc nnogdq gjltmg x drswn zadmvb a
Output: krpkmmrbwpmc

Example 2:

Input: einses anbts ncf zs maytxd
Output: einses

Example 3:

Input: uqlm cmeohkzxugag zlp
Output: cmeohkzxugag

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Quartermaster's Wistful Ledger - EASY Coding Problem | CodeTikki