#include<bits/stdc++.h> using namespace std; int main(){ char a[1000]; int c[26]={0}; int i; gets(a); for(i=0;i<strlen(a)-1;i++) c[a[i]-'a']++; for(i=0;i<26;i++) if(c[i]>0) cout<<char('a'+i)<<":"<<c[i]<<" "; return 0; } /************************************************************** Problem: 1164 User: wtq001 Language: C++ Result: Accepted Time:8 ms Memory:2072 kb ****************************************************************/