Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Namo

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-06 21:35:27

#include <bits/stdc++.h>
using namespace std;

int main() {
	int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;
	string str;
	cin >> str;
	for (int i = 0; i < str.size(); i++) {
		if (str[i] == 'A')
			a++;
		else if (str[i] == 'B')
			b++;
		else if (str[i] == 'C')
			c++;
		else if (str[i] == 'D') 
			d++;
		else if (str[i] == 'E')
			e++;
		else if (str[i] == 'F')
			f++;
		else if (str[i] == 'G')
			g++;
		else if (str[i] == 'H')
			h++;
	}
	cout << a << ' ' << b << ' ' << c << ' ' << d << ' ' << e << ' ' << f << ' ' << g << ' ' << h;
}