CT22715

Iker's Longest Word Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Iker inherited the brewery at the beacon hill of Lantern Tor along with its curious bookkeeping system for verses. Time to make sense of it. 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| <= 577; s contains lowercase English letters.

Example 1:

Input: abaxlvneeshh mpotrcg oppqvl rwrptfxeaho ewhdvgn hrzy iclhs hoife
Output: abaxlvneeshh

Example 2:

Input: kzsfthhbn ejau
Output: kzsfthhbn

Example 3:

Input: hvghe hy lzma mstetr xokueqw oyqojpc
Output: xokueqw

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Iker's Longest Word Ledger - EASY Coding Problem | CodeTikki