結果

問題 No.394 ハーフパイプ(1)
ユーザー samplelpmassamplelpmas
提出日時 2017-01-04 19:37:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 560 bytes
コンパイル時間 3,004 ms
コンパイル使用メモリ 79,068 KB
実行使用メモリ 56,172 KB
最終ジャッジ日時 2023-08-22 18:48:44
合計ジャッジ時間 4,563 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,012 KB
testcase_01 AC 127 ms
56,172 KB
testcase_02 AC 126 ms
54,184 KB
testcase_03 AC 125 ms
56,080 KB
testcase_04 AC 124 ms
56,068 KB
testcase_05 AC 126 ms
55,872 KB
testcase_06 AC 127 ms
56,000 KB
testcase_07 AC 123 ms
55,832 KB
testcase_08 AC 125 ms
55,996 KB
testcase_09 AC 126 ms
55,788 KB
testcase_10 AC 126 ms
56,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int[] scores = new int[6];

        for (int i = 0; i < scores.length; i++) {
            scores[i] = sc.nextInt();
        }

        Arrays.sort(scores);

        int scoreSum = 0;

        for (int i = 1; i < scores.length - 1; i++) {
            scoreSum += scores[i];
        }

        double socore = (double) scoreSum / 4;

        System.out.printf("%.2f\n", socore);

    }

}
0