Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Whatthepoop

Problemset: อะนาแกรม 1

Language: c

Time: 0.002 second

Submitted On: 2025-10-12 17:26:22

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

int main(){
    char s[10050];
    scanf("%s", s);

    int len = strlen(s);
    int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;

    for(int i = 0; i < len; i++){
        if(s[i] == 'A') a++;
        if(s[i] == 'B') b++;
        if(s[i] == 'C') c++;
        if(s[i] == 'D') d++;
        if(s[i] == 'E') e++;
        if(s[i] == 'F') f++;
        if(s[i] == 'G') g++;
        if(s[i] == 'H') h++;
    }

    printf("%d %d %d %d %d %d %d %d", a, b ,c ,d ,e ,f ,g ,h);
    return 0;
}