Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: peilin
Problemset: อะนาแกรม 1
Language: c
Time: 0.002 second
Submitted On: 2025-10-10 21:49:29
#include <stdio.h>
#include<string.h>
int main() {
char s[10000];
int i,a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;
scanf("%s", s);
for(i=0; i<strlen(s); 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;
}