Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Tonpai
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.003 second
Submitted On: 2026-05-16 13:31:49
#include <bits/stdc++.h>
using namespace std;
int main(){
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;
string t;
cin >> t;
for(int i=0;i<t.size();i++){
if(t[i] == 'A') a++;
else if(t[i] == 'B') b++;
else if(t[i] == 'C') c++;
else if(t[i] == 'D') d++;
else if(t[i] == 'E') e++;
else if(t[i] == 'F') f++;
else if(t[i] == 'G') g++;
else if(t[i] == 'H') h++;
}
cout << a << ' ' << b << ' ' << c << ' ' << d << ' ' << e << ' ' << f << ' ' << g << ' ' << h;
}