結果

問題 No.394 ハーフパイプ(1)
ユーザー TatsuDXTatsuDX
提出日時 2016-09-03 14:36:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 680 bytes
コンパイル時間 2,958 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 54,500 KB
最終ジャッジ日時 2024-04-27 15:19:10
合計ジャッジ時間 4,984 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
53,992 KB
testcase_01 AC 121 ms
54,116 KB
testcase_02 AC 131 ms
53,960 KB
testcase_03 AC 135 ms
54,108 KB
testcase_04 AC 127 ms
54,500 KB
testcase_05 AC 126 ms
53,976 KB
testcase_06 AC 129 ms
54,372 KB
testcase_07 AC 135 ms
54,328 KB
testcase_08 AC 125 ms
54,256 KB
testcase_09 AC 117 ms
53,388 KB
testcase_10 AC 128 ms
53,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		double a, b, c, d, e, f, min, max;
		a = sc.nextDouble();
		min = a;
		max = a;
		b = sc.nextDouble();
		min = Math.min(min, b);
		max = Math.max(max, b);
		c = sc.nextDouble();
		min = Math.min(min, c);
		max = Math.max(max, c);
		d = sc.nextDouble();
		min = Math.min(min, d);
		max = Math.max(max, d);
		e = sc.nextDouble();
		min = Math.min(min, e);
		max = Math.max(max, e);
		f = sc.nextDouble();
		min = Math.min(min, f);
		max = Math.max(max, f);
		double ans = (a + b + c + d + e + f - min - max) / 4;
		System.out.printf("%.2f", ans);
	}
}
0