Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: tonkla
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.006 second
Submitted On: 2026-10-06 21:43:18
#include<iostream>
#include<string>
using namespace std;
int main(){
string x;
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;
cin>> x;
for (int i =0;i<x.length();i++){
if(x[i]=='A'){
a++;
}
if(x[i]=='B'){
b++;
}
if(x[i]=='C'){
c++;
}
if(x[i]=='D'){
d++;
}
if(x[i]=='E'){
e++;
}
if(x[i]=='F'){
f++;
}
if(x[i]=='G'){
g++;
}
if(x[i]=='H'){
h++;
}
}
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" "<<g<<" "<<h;
}