Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: mumumimi
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.005 second
Submitted On: 2026-10-01 20:56:38
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;cin >> s;
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;
int n=s.length();
for(int i=0;i<n;i++){
if(s[i]=='A'){
a++;
}else if(s[i]=='B'){
b++;
}else if(s[i]=='C'){
c++;
}else if(s[i]=='D'){
d++;
}else if(s[i]=='E'){
e++;
}else if(s[i]=='F'){
f++;
}else if(s[i]=='G'){
g++;
}else if(s[i]=='H'){
h++;
}
}
cout << a << " " << b << " " << c << " " << d <<" " << e << " " << f<<" " << g<< " " << h;
}