CT25303

Rohan's Ledger of labels

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The ledger master Rohan has been asked to prove the quality of the harvest. On the desk lies a long table of labels readings. 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| <= 610; s contains lowercase English letters.

Example 1:

Input: vtyqlqgsapkpoipkexpdfnnkjqvsipaqosmzwlndkcdoloptmxfkvvsaufaeahavbmtqzzwexwyqbclsisljiqhybxxrowbbpzrnfzjxhdxngnhhintkrpjuszkbizqrfossnalelwsgbwbubvdifgsyhterggarmpuvscdgczsprxfmbzcwjhhysctdtvzpexmqwvnxecgduvamzzsqgydpvoolbeovoatycfckanpqyzrdvahouejprcvunkdvcpxcagkyclrecqiigabhgoxmkfkuwfwcazsejebrumsmjsctkaddtyzsmkmfcptiiwhigcudwrbzgbmfjajojvfcpsqrzkkmosmbumevaimuzrwbhtinzwobzaxuoltitobsrxgvebrbovukcvtppxdzgbgueybpvc
Output: b

Example 2:

Input: kvdqhvamqupsfrhukwhvmjfbbhcyfvwlfsqekjhacespzpdcwiyxsiveawclyuxpipnajulzgreomsuzvovsgrkhraqikuheyuyiyshocglegtulpmxerzzugvsezbpteakkbedszxoifpsupoqgqijdtljwehnyniiuddbezksnjcfiojbnylcsrerniolseugpmdizwgjsvbjurgqaesorlcsveqgwgsqzselgstyqmrxwpnhoivhitsfwapzouewayypcxdozayxz
Output: s

Example 3:

Input: xzqqjjreyeggcgjmbgdbhpqmnxgnokrwhzccvzio
Output: g

Constraints:

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

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