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