Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: bananakung

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.003 second

Submitted On: 2025-07-17 20:19:57

#include<iostream>
using namespace std;
int main()
{
	string str;
	cin>>str;
	int c[8]={};
	for(int i=0;i<str.length();i++)
	{
		if(str[i]=='A')c[0]++;
		else if(str[i]=='B')c[1]++;
		else if(str[i]=='C')c[2]++;
		else if(str[i]=='D')c[3]++;
		else if(str[i]=='E')c[4]++;
		else if(str[i]=='F')c[5]++;
		else if(str[i]=='G')c[6]++;
		else if(str[i]=='H')c[7]++;
	}
	for(int i=0;i<8;i++) cout<<c[i]<<" ";
}