Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: karnsinee

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.002 second

Submitted On: 2025-08-08 20:19:52

#include<bits/stdc++.h>
using namespace std;
int main(){
	string a;
	int n;
	int s[8]={0};
	cin>>a;
	n=a.size();
	for(int i=0;i<n;i++){
	if(a[i]=='A'){
		s[0]++;
	}
	else if(a[i]=='B'){
		s[1]++;
	}
	else if(a[i]=='C'){
		s[2]++;
	}
	else if(a[i]=='D'){
		s[3]++;
	}
	else if(a[i]=='E'){
		s[4]++;
	}
	else if(a[i]=='F'){
		s[5]++;
	}
	else if(a[i]=='G'){
		s[6]++;
	}
	else if(a[i]=='H'){
		s[7]++;
	}	
	}
	
	for(int i=0;i<8;i++){
		cout<<s[i]<<" ";
	}

}