| #include< bits/stdc++.h > using namespace std; | |
| int main() { | |
| int t; | |
| string s; | |
| cin >> t; | |
| while(t--) { | |
| int ar[256]= {0}; | |
| cin >> s; | |
| for(char ch : s){ | |
| ar[ch]++; | |
| } | |
| for(char ch = 'a' ; ch <= 'z';ch++ ) { | |
| if(ar[ch] > 0) cout << ch << " = " << ar[ch] << endl; | |
| } | |
| if(t>=1)cout << endl; | |
| } | |
| return 0; | |
| } |
No comments:
Post a Comment