結果
| 問題 |
No.8020 サンシャイン◯崎
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-31 22:29:07 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 330 bytes |
| コンパイル時間 | 732 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 13:45:13 |
| 合計ジャッジ時間 | 1,399 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(void){
int l,i,y=0,e=0,a=0,h=0,x=0;
char s[131072];
scanf("%s",s);
l = strlen(s);
for(i = 0;i < l;i++){
if(s[i] == 'Y'){y++;}
if(s[i] == 'E'){e++;}
if(s[i] == 'A'){a++;}
if(s[i] == 'H'){h++;}
if(s[i] == '!'){x++;}
}
printf("%d %d %d %d %d\n",y,e,a,h,x);
return 0;
}