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