diff --git a/QUSTOJ/1516.cpp b/QUSTOJ/1516.cpp new file mode 100644 index 0000000..a84f256 --- /dev/null +++ b/QUSTOJ/1516.cpp @@ -0,0 +1,35 @@ +#include +#include +#include +#include +using namespace std; +int cnt[1005]; +int main() +{ + int n,tmp; + while(scanf("%d",&n)==1&&n!=0) + { + memset(cnt,0,sizeof(int)*1005); + for(int i=0;i +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; +}