#C14170. Most Frequent Character
Most Frequent Character
Most Frequent Character
You are given a string \(S\). Your task is to determine the character that appears most frequently in \(S\) and output that character together with its frequency. In the event where multiple characters share the highest frequency, choose the lexicographically smallest character. If the string is empty, output the error message \(\text{'max() arg is an empty sequence'}\).
inputFormat
The input consists of a single line containing the string \(S\). Note that \(S\) may be an empty string.
outputFormat
If \(S\) is non-empty, print the character and its frequency separated by a space. Otherwise, print the error message exactly as max() arg is an empty sequence
.
aabbbcc
b 3