Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: APNICHANAN

Problemset: อะนาแกรม 1

Language: c

Time: 0.002 second

Submitted On: 2025-09-27 09:36:47

#include <stdio.h>
#include <string.h>

int main()
{
    char str[10000];
    scanf("%s", str);
    int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;
    for (int i = 0; i < strlen(str); i++)
    {
        if (str[i] == 'A')
            a++;
        else if (str[i] == 'B')
            b++;
        else if (str[i] == 'C')
            c++;
        else if (str[i] == 'D')
            d++;
        else if (str[i] == 'E')
            e++;
        else if (str[i] == 'F')
            f++;
        else if (str[i] == 'G')
            g++;
        else if (str[i] == 'H')
            h++;
    }
    printf("%d %d %d %d %d %d %d %d", a, b, c, d, e, f, g, h);
}