Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Patn01Z
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-08 19:49:13
#include <iostream>
using namespace std;
int main(){
string N;
cin >> N;
int l = N.length();
int f[8]={0};
for(int i=0;i<l;i++){
char a = N[i];
if(a=='A'){
f[0]++;
}
else if(a=='B'){
f[1]++;
}
else if(a=='C'){
f[2]++;
}
else if(a=='D'){
f[3]++;
}
else if(a=='E'){
f[4]++;
}
else if(a=='F'){
f[5]++;
}
else if(a=='G'){
f[6]++;
}
else{
f[7]++;
}
}
for(int i=0;i<8;i++){
cout << f[i] << " ";
}
return 0;
}