結果

問題 No.394 ハーフパイプ(1)
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 18:20:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 1,953 ms
コンパイル使用メモリ 72,592 KB
実行使用メモリ 56,252 KB
最終ジャッジ日時 2023-10-11 12:22:04
合計ジャッジ時間 4,233 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
56,172 KB
testcase_01 AC 124 ms
56,048 KB
testcase_02 AC 124 ms
56,044 KB
testcase_03 AC 124 ms
56,252 KB
testcase_04 AC 124 ms
55,948 KB
testcase_05 AC 125 ms
55,692 KB
testcase_06 AC 123 ms
56,192 KB
testcase_07 AC 125 ms
56,188 KB
testcase_08 AC 122 ms
55,952 KB
testcase_09 AC 125 ms
56,144 KB
testcase_10 AC 124 ms
56,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		double sum = 0;
		int[] ar = new int[6];
		for (int i=0; i<6; i++) ar[i] = sc.nextInt();
		Arrays.sort(ar);
		for (int i=1; i<5; i++) sum += ar[i];
		System.out.println(String.format("%.2f",sum/4));
		
		
	}
}
0