Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: limsan20122

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.004 second

Submitted On: 2025-10-03 16:05:11

#include <iostream>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string x;
    int a=0;
    int b=0;
    int c=0;
    int d=0;
    int e=0;
    int f=0;
    int g=0;
    int 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;
    return 0;
}