题解 | #字符数量#
字符数量
https://ac.nowcoder.com/acm/problem/22225
#include<bits/stdc++.h>
using namespace std;
int a[27];
int main(){
char c=getchar();
while(c!=EOF){
if(c>='a'&&c<='z') a[c-97]++;
c=getchar();
}
for(int i=0;i<26;i++){
if(a[i]) printf("%c:%d\n",i+97,a[i]);
}
}