CT26124

Quade's Ledger of ribbons

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the singing sands of Echo Dunes. Quade spreads the ribbons records across the table and picks up a sharp pencil. 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| <= 1092; s contains lowercase English letters.

Example 1:

Input: fnbkoow bfy axywjb fgmzmeesabu zojuhtg trm pdonxswf okd jgvcbedrjvjb aqz hgzfkjkvev
Output: jgvcbedrjvjb

Example 2:

Input: birvmloxvp ovvwbyeb bgpmksiunyj lzqhivt
Output: bgpmksiunyj

Example 3:

Input: cbd sesnmi zwfaz mkapajrtc tvqbb sr snwoyedsm nimhuehmiwv t paatyivey
Output: nimhuehmiwv

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Quade's Ledger of ribbons - EASY Coding Problem | CodeTikki