結果
問題 | No.8020 サンシャイン◯崎 |
ユーザー |
|
提出日時 | 2017-03-31 22:32:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 608 bytes |
コンパイル時間 | 1,314 ms |
コンパイル使用メモリ | 159,000 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 13:56:50 |
合計ジャッジ時間 | 2,058 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; namespace { char S[ 100009 ]; } int main( int argc, char *argv[] ) { int i; int iY; int iE; int iA; int iH; int iM; char C; // 文字列を取得 cin >> S; // 文字数をカウント i = 0; iY = 0; iE = 0; iA = 0; iH = 0; iM = 0; C = S[ i ]; while( C != '\0' ) { i++; if( C == 'Y' ) iY++; else if( C == 'E' ) iE++; else if( C == 'A' ) iA++; else if( C == 'H' ) iH++; else if( C == '!' ) iM++; // 次の文字 C = S[ i ]; } // 出力 cout << iY << " " << iE << " " << iA << " " << iH << " " << iM << endl; return 0; }