結果

問題 No.394 ハーフパイプ(1)
ユーザー YamaKasaYamaKasa
提出日時 2018-05-04 17:20:13
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 4,409 ms
コンパイル使用メモリ 71,488 KB
実行使用メモリ 56,920 KB
最終ジャッジ日時 2023-09-10 09:43:07
合計ジャッジ時間 5,839 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int []S = new int[6];
		for(int i = 0; i < 6; i++) {
			S[i] = scan.nextInt();
		}
		scan.close();
		Arrays.sort(S);
		int sum = 0;
		for(int i = 1; i < 5; i++) {
			sum += S[i];
		}
		double ans = sum / 4;
		ans = Math.round(ans * 100) / 100;
		System.out.printf("%.2f", ans);
		System.out.println();
	}
}
0