#include <stdio.h>
#include <string.h>
int main() {
int counts[10] = {0};
char number[1001];
for (int i
= 0; i
< strlen(number
); i
++) { counts[number[i] - '0']++;
}
int max_digit = 0;
for (int i = 1; i < 10; i++) {
if (counts[i] > counts[max_digit]) {
max_digit = i;
}
}
printf(" : %d\n", counts
[max_digit
]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBtYWluKCkgewogICAgaW50IGNvdW50c1sxMF0gPSB7MH07CiAgICAKICAgIAogICAgY2hhciBudW1iZXJbMTAwMV07IAogICAgc2NhbmYoIiUxMDAwcyIsIG51bWJlcik7ICAKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgc3RybGVuKG51bWJlcik7IGkrKykgewogICAgICAgIGNvdW50c1tudW1iZXJbaV0gLSAnMCddKys7CiAgICB9CiAgICAKICAgIAogICAgaW50IG1heF9kaWdpdCA9IDA7CiAgICBmb3IgKGludCBpID0gMTsgaSA8IDEwOyBpKyspIHsKICAgICAgICBpZiAoY291bnRzW2ldID4gY291bnRzW21heF9kaWdpdF0pIHsKICAgICAgICAgICAgbWF4X2RpZ2l0ID0gaTsKICAgICAgICB9CiAgICB9CiAgICAKICAgIAogICAgcHJpbnRmKCIlZFxuIiwgbWF4X2RpZ2l0KTsKICAgIHByaW50ZigiIDogJWRcbiIsIGNvdW50c1ttYXhfZGlnaXRdKTsKICAgIAogICAgcmV0dXJuIDA7Cn0K