mirror of
https://github.com/xlucn/PAT.git
synced 2026-02-06 19:12:14 +08:00
15 lines
222 B
C
15 lines
222 B
C
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
char c;
|
|
int count[10] = {0};
|
|
while ((c = getchar()) != '\n' && c != EOF)
|
|
count[c - '0']++;
|
|
|
|
for (int i = 0; i < 10; i++) if (count[i])
|
|
printf("%d:%d\n", i, count[i]);
|
|
|
|
return 0;
|
|
}
|