結果

問題 No.394 ハーフパイプ(1)
ユーザー tentententen
提出日時 2020-11-11 14:36:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 414 bytes
コンパイル時間 1,978 ms
コンパイル使用メモリ 71,808 KB
実行使用メモリ 58,104 KB
最終ジャッジ日時 2023-09-30 00:31:24
合計ジャッジ時間 4,203 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 121 ms
55,620 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 122 ms
55,940 KB
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[6];
        for (int i = 0; i < 6; i++) {
            arr[i] = sc.nextInt();
        }
        Arrays.sort(arr);
        int sum = 0;
        for (int i = 1; i < 5; i++) {
            sum += arr[i];
        }
        System.out.println(sum / 4.0);
    }
}
0