OJ-Problems-Source/QUSTOJ/1520.cpp
2016-05-24 15:27:19 +08:00

20 lines
269 B
C++

#include <cstdio>
int cnt[26];
int main()
{
char c;
while((c=fgetc(stdin))!='#')
{
if(c>='a'&&c<='z')
{
++cnt[c-'a'];
}
}
for(int i=0;i<26;i++)
{
printf("%c %d\n",i+'a',cnt[i]);
}
return 0;
}