#include<stdio.h>
#include<string.h>
#define maxsize 1001
int main(){
char a[maxsize];
int i,len;
int cnt_0=0,cnt_1=0,cnt_2=0,cnt_3=0,cnt_4=0,cnt_5=0,cnt_6=0,cnt_7=0,cnt_8=0,cnt_9=0;
scanf("%s",&a);
len=strlen(a);
for(i=0;i<len;i++){
switch(a[i]-'0'){
case 0:cnt_0++;
break;
case 1:cnt_1++;
break;
case 2:cnt_2++;
break;
case 3:cnt_3++;
break;
case 4:cnt_4++;
break;
case 5:cnt_5++;
break;
case 6:cnt_6++;
break;
case 7:cnt_7++;
break;
case 8:cnt_8++;
break;
case 9:cnt_9++;
break;
}
}
if(cnt_0>0){
printf("0:%d\n",cnt_0);
}
if(cnt_1>0){
printf("1:%d\n",cnt_1);
}
if(cnt_2>0){
printf("2:%d\n",cnt_2);
}
if(cnt_3>0){
printf("3:%d\n",cnt_3);
}
if(cnt_4>0){
printf("4:%d\n",cnt_4);
}
if(cnt_5>0){
printf("5:%d\n",cnt_5);
}
if(cnt_6>0){
printf("6:%d\n",cnt_6);
}
if(cnt_7>0){
printf("7:%d\n",cnt_7);
}
if(cnt_8>0){
printf("8:%d\n",cnt_8);
}
if(cnt_9>0){
printf("9:%d\n",cnt_9);
}
return 0;
}
#include<string.h>
#define maxsize 1001
int main(){
char a[maxsize];
int i,len;
int cnt_0=0,cnt_1=0,cnt_2=0,cnt_3=0,cnt_4=0,cnt_5=0,cnt_6=0,cnt_7=0,cnt_8=0,cnt_9=0;
scanf("%s",&a);
len=strlen(a);
for(i=0;i<len;i++){
switch(a[i]-'0'){
case 0:cnt_0++;
break;
case 1:cnt_1++;
break;
case 2:cnt_2++;
break;
case 3:cnt_3++;
break;
case 4:cnt_4++;
break;
case 5:cnt_5++;
break;
case 6:cnt_6++;
break;
case 7:cnt_7++;
break;
case 8:cnt_8++;
break;
case 9:cnt_9++;
break;
}
}
if(cnt_0>0){
printf("0:%d\n",cnt_0);
}
if(cnt_1>0){
printf("1:%d\n",cnt_1);
}
if(cnt_2>0){
printf("2:%d\n",cnt_2);
}
if(cnt_3>0){
printf("3:%d\n",cnt_3);
}
if(cnt_4>0){
printf("4:%d\n",cnt_4);
}
if(cnt_5>0){
printf("5:%d\n",cnt_5);
}
if(cnt_6>0){
printf("6:%d\n",cnt_6);
}
if(cnt_7>0){
printf("7:%d\n",cnt_7);
}
if(cnt_8>0){
printf("8:%d\n",cnt_8);
}
if(cnt_9>0){
printf("9:%d\n",cnt_9);
}
return 0;
}