CT26033

The Honeyed Longest Word

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the quays of Driftwood close for winter, Jatin must finish the sigils ledger - one figure at a time. 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| <= 844; s contains lowercase English letters.

Example 1:

Input: pwenyblqxg tubhmjhp
Output: pwenyblqxg

Example 2:

Input: goyquwajol myaocjjrerkg oqietajcrn mgpbc ejakmj
Output: myaocjjrerkg

Example 3:

Input: fsm xhmsrwn lmzflq esjgezx shvd mpgpqsvkcptw bzmgeda g tralnof y
Output: mpgpqsvkcptw

Constraints:

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

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