T1187 Counting characters (#Ⅱ- 2)

【Title description】

Given a string consisting of 26 characters a-z, count which character appears the most times.

【enter】

The input consists of one line, a string, up to 1000 in length.

【Output】

Output a line containing the character with the most occurrences and the number of occurrences of that character, separated by a space. If there are multiple characters with the same number of occurrences and the most, then output the character with the smallest ascii code.

【Input example】

abbccc

【Example of output】

c 3

【Source program】

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324652477&siteId=291194637