OJ-Problems-Source/HDOJ/1219_autoAC.cpp

18 lines
339 B
C++
Raw Normal View History

2016-08-13 17:16:08 +08:00
#include<stdio.h>
#include<memory.h>
int main ()
{
int s,i,b[26];
char a[100001];
while(gets(a)!=NULL)
{
memset(b,0,sizeof(b));
for(i=0;a[i]!='\0';i++)
b[a[i]-'a']++;
for(i=0;i<26;i++)
printf("%c:%d\n",'a'+i,b[i]);
printf("\n");
}
return 0;
}