結果

問題 No.394 ハーフパイプ(1)
ユーザー butsurizuki
提出日時 2016-12-03 20:20:16
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 20,736 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 14:35:19
合計ジャッジ時間 909 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |                 scanf("%d",&n);
      |                 ^~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

int main(void){
	int s = 0,i,n,max=-1,min=101;
	for(i = 1;i <= 6;i++){
		scanf("%d",&n);
		s+=n;
		if(max < n){max = n;}
		if(min > n){min = n;}
	}
	s-=(max+min);
	printf("%d.%02d",s/4,(s*100/4)%100);
	return 0;
}
0