結果

問題 No.394 ハーフパイプ(1)
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-04 12:08:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 735 bytes
コンパイル時間 2,066 ms
コンパイル使用メモリ 71,968 KB
実行使用メモリ 56,056 KB
最終ジャッジ日時 2023-10-12 07:52:26
合計ジャッジ時間 4,414 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,352 KB
testcase_01 AC 122 ms
55,624 KB
testcase_02 AC 120 ms
55,768 KB
testcase_03 AC 117 ms
55,752 KB
testcase_04 AC 118 ms
56,000 KB
testcase_05 AC 120 ms
55,848 KB
testcase_06 AC 120 ms
55,644 KB
testcase_07 AC 118 ms
56,056 KB
testcase_08 AC 120 ms
54,036 KB
testcase_09 AC 122 ms
55,612 KB
testcase_10 AC 118 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String[] inputs = reader.readLine().split(" ");
        int max = Integer.MIN_VALUE;
        int min = Integer.MAX_VALUE;
        int sum = 0;
        for (int i = 0; i < 6; i++) {
            int point = Integer.parseInt(inputs[i]);
            max = Math.max(max, point);
            min = Math.min(min, point);
            sum += point;
        }
        sum = sum - min - max;
        System.out.printf("%.2f",sum/(4.0));
    }
}
0