B. 练61.1 统计字符数

    Type: Default 1000ms 256MiB

练61.1 统计字符数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

Given a string composed of the 2626 characters from aa to zz, count which character appears most frequently?

Input Format

The input contains one line, a string with length not exceeding 10001000.

Output Format

Output one line containing the character that appears most frequently and its count, separated by a space. If multiple characters appear the same maximum number of times, output the character with the smallest ASCII code.

Sample

abbccc
c 3

20250920C班作业(2)

Not Claimed
Status
Done
Problem
4
Open Since
2025-9-20 0:00
Deadline
2025-10-11 23:59
Extension
24 hour(s)