Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: eefirefire

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.006 second

Submitted On: 2026-10-05 19:29:19

#include <iostream>
using namespace std;

int main()
{
    string word;
    cin >> word;

    int a = 0;
    int b = 0;
    int c = 0;
    int d = 0;
    int e = 0;
    int f = 0;
    int g = 0;
    
    for (char i : word)
    {
        if (i == 'A')
        {
            a++;
        }
        if (i == 'B')
        {
            b++;
        }
        if (i == 'C')
        {
            c++;
        }
        if (i == 'D')
        {
            d++;
        }
        if (i == 'E')
        {
            e++;
        }
        if (i == 'F')
        {
            f++;
        }
        if (i == 'G')
        {
            g++;
        }
    }

    cout << a << " " << b << " " << c << " " << d << " " << e << " " << f;
}