結果

問題 No.8020 サンシャイン◯崎
ユーザー mizakuramizakura
提出日時 2017-03-31 22:32:39
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 419 bytes
コンパイル時間 598 ms
コンパイル使用メモリ 64,128 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 13:56:58
合計ジャッジ時間 1,254 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

int main() {
	std::string str;
	std::cin >> str;
	int y = 0;
	int e = 0;
	int a = 0;
	int h = 0;
	int b = 0;

	for (auto itr = str.begin(); itr != str.end(); itr++) {
		if (*itr == 'Y') y++;
		if (*itr == 'E') e++;
		if (*itr == 'A') a++;
		if (*itr == 'H') h++;
		if (*itr == '!') b++;
	}
	std::cout << y << ' ' << e << ' ' << a << ' ' << h << ' ' << b << std::endl;
	return 0;
}
0