結果

問題 No.394 ハーフパイプ(1)
ユーザー RinRin
提出日時 2016-09-09 11:29:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 4,078 ms
コンパイル使用メモリ 74,152 KB
実行使用メモリ 54,264 KB
最終ジャッジ日時 2024-04-27 22:24:21
合計ジャッジ時間 5,951 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
53,524 KB
testcase_01 AC 117 ms
53,916 KB
testcase_02 AC 103 ms
52,920 KB
testcase_03 AC 104 ms
52,956 KB
testcase_04 AC 113 ms
53,892 KB
testcase_05 AC 109 ms
53,352 KB
testcase_06 AC 113 ms
53,752 KB
testcase_07 AC 118 ms
54,264 KB
testcase_08 AC 107 ms
53,944 KB
testcase_09 AC 102 ms
52,780 KB
testcase_10 AC 117 ms
53,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class b {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int max = -1;
		int min = -1;
		double sum = 0;
		for(int i = 0; i < 6; i++){
			int foo = sc.nextInt();
			if(max == -1 || foo > max)
				max = foo;
			if(min == -1 || foo < min)
				min = foo;
			sum += foo;
		}
		System.out.printf("%.2f\n", (sum - max - min) / 4);
	}
}
0