Create 1520.cpp

This commit is contained in:
KiritoTRw 2016-05-24 15:27:19 +08:00
parent c19572dbaf
commit d9fa4ba068

19
QUSTOJ/1520.cpp Normal file
View File

@ -0,0 +1,19 @@
#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;
}