CT27659

Clerk's Jade verses

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the lantern reef of Glowtide close for winter, Clerk must finish the verses ledger - one figure at a time. Task: Read a lowercase string s and print the character that occurs most often. If several tie, print the alphabetically smallest. Input format: One line with a single lowercase string s. Output format: Print a single character. Constraints: 1 <= |s| <= 595; s contains lowercase English letters.

Example 1:

Input: icbrxgucla
Output: c

Example 2:

Input: fozxqayweopallvvqyqdvqglbxobfyctbjmnzrdcqthwaksthpbkvbtpqdgozlqnotqkccjlncayikfxrrhbxcepcjzfpifigjpncofotiecjueasecrbomzolqlxmbfhrvnptgvtskubvnnbovbfvbxcgcyifheykcoctkangxezevdfjzaqwwgrlydkfywurlobywrcevzpykjsxkog
Output: c

Example 3:

Input: yfhbxtygc
Output: y

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.