Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: chickennuggget

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.002 second

Submitted On: 2025-09-30 17:38:46

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