mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
20 lines
269 B
C++
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;
|
||
|
}
|