CT1445

Last ribbons of Tina

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

It is audit day at the ink district of Scriptoria. Tina spreads the ribbons records across the table and picks up a sharp pencil. 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| <= 77; s contains lowercase English letters.

Example 1:

Input: ddsuozrlvheexxyftizfrpt
Output: d

Example 2:

Input: uddnu
Output: d

Example 3:

Input: sfjmpwcduvpsrhptlmrqzjpkpzpcaxrmjglmnokkmqzidrjaluolsvlnybocjjrufnbefeyhdwuwm
Output: j

Constraints:

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

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