結果

問題 No.8020 サンシャイン◯崎
ユーザー butsurizuki
提出日時 2017-03-31 22:26:41
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 13:51:58
合計ジャッジ時間 860 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
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);
      |         ^~~~~~~~~~~~~

ソースコード

diff #

#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",y,e,a,h,x);
	return 0;
}
0