CT27358

Freya's Granite Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the ivy courts of Vineward, Freya studies rows of scrolls entries. One clean number will settle the guild's oldest argument. 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| <= 1280; s contains lowercase English letters.

Example 1:

Input: ylxtycpon jcdxtfitjm f
Output: jcdxtfitjm

Example 2:

Input: r sue
Output: sue

Example 3:

Input: ohhpgoxe feft m eqmjxmhgmfr dfghnaqgwp wtxym owdmohq
Output: eqmjxmhgmfr

Constraints:

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

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