Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: eefirefire
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-05 19:32:03
#include <iostream>
using namespace std;
int main()
{
string word;
cin >> word;
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
int g = 0;
int h = 0;
for (char i : word)
{
if (i == 'A')
{
a++;
}
if (i == 'B')
{
b++;
}
if (i == 'C')
{
c++;
}
if (i == 'D')
{
d++;
}
if (i == 'E')
{
e++;
}
if (i == 'F')
{
f++;
}
if (i == 'G')
{
g++;
}
if (i == 'H')
{
h++;
}
}
std::cout << a << " " << b << " " << c << " " << d << " " << e << " " << f << " " << g << " " << h;
}