Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: havename

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-04 22:43:58

#include<bits/stdc++.h>
using namespace std;
int main(){
    string st;
    cin>>st;
    int A = 0,B = 0,C = 0,D = 0,E = 0,F = 0,G = 0,H = 0;

    for(int i=0;i<st.size();i++){
        if(st[i]=='A'){
            A=A+1;
        }
        else if(st[i]=='B'){
            B=B+1;
        }
        else if(st[i]=='C'){
            C=C+1;
        }
        else if(st[i]=='D'){
            D=D+1;
        }
        else if(st[i]=='E'){
            E=E+1;
        }
        else if(st[i]=='F'){
            F=F+1;
        }
        else if(st[i]=='G'){
            G=G+1;
        }
        else if(st[i]=='H'){
            H=H+1;
        }
    }
    cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<" "<<F<<" "<<G<<" "<<H;
}