mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1520.cpp
This commit is contained in:
parent
c19572dbaf
commit
d9fa4ba068
19
QUSTOJ/1520.cpp
Normal file
19
QUSTOJ/1520.cpp
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user