結果

問題 No.394 ハーフパイプ(1)
ユーザー yagi2yagi2
提出日時 2017-04-17 11:32:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 610 bytes
コンパイル時間 2,390 ms
コンパイル使用メモリ 79,696 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-26 10:32:56
合計ジャッジ時間 4,716 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,720 KB
testcase_01 AC 123 ms
55,684 KB
testcase_02 AC 122 ms
55,564 KB
testcase_03 AC 122 ms
56,164 KB
testcase_04 AC 122 ms
55,820 KB
testcase_05 AC 123 ms
56,224 KB
testcase_06 AC 122 ms
55,808 KB
testcase_07 AC 123 ms
55,912 KB
testcase_08 AC 121 ms
55,524 KB
testcase_09 AC 122 ms
56,084 KB
testcase_10 AC 123 ms
56,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

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

        List<Integer> scores = new ArrayList<>();
        for (int i = 0; i < 6; i++) {
            scores.add(Integer.parseInt(sc.next()));
        }
        Collections.sort(scores);
        scores.remove(0);
        scores.remove(scores.size()-1);

        int sum = 0;
        for (int i : scores) {
            sum += i;
        }
        System.out.printf("%.2f\n",sum / 4.0);
    }
}
0