結果
| 問題 |
No.8020 サンシャイン◯崎
|
| コンテスト | |
| ユーザー |
57tggx
|
| 提出日時 | 2017-03-31 22:26:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 292 bytes |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 23,040 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-23 13:51:56 |
| 合計ジャッジ時間 | 876 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s", ch);
| ~~~~~^~~~~~~~~~
ソースコード
#include<cstdio>
int main(){
char ch[100000];
int Y=0, E=0, A=0, H=0, e=0;
scanf("%s", ch);
for(unsigned i = 0; ch[i]; i++)
switch(ch[i]){
case 'Y':
Y++;break;
case 'E':
E++;break;
case 'A':
A++;break;
case 'H':
H++;break;
case '!':
e++;break;
}
printf("%d %d %d %d %d\n", Y, E, A, H, e);
}
57tggx