CT28356

Last riddles of Kavi

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the herring shoals of Silverfin pays by the answer, and Kavi intends to earn it. First: the full register of riddles. 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| <= 632; s contains lowercase English letters.

Example 1:

Input: gqgpfgmqwux re imugrbs zheufiqtkoev f nqo
Output: zheufiqtkoev

Example 2:

Input: dfcekxdubwu vd mlfnntndf fpkpdzskrunr lr by qge gnoxriu qjpprkhrxo jmtpfvwmy lxghbbxtlihr lfy
Output: fpkpdzskrunr

Example 3:

Input: aoqrvic mrqwpukx xphhkkdvnahp rfkensjupv rnh duwlq a xfnzaw gt
Output: xphhkkdvnahp

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Last riddles of Kavi - EASY Coding Problem | CodeTikki