Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: APNICHANAN

Problemset: อะนาแกรม 1

Language: c

Time: 0.002 second

Submitted On: 2025-09-27 09:35:29

#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);
}