結果

問題 No.394 ハーフパイプ(1)
ユーザー TakaTaka
提出日時 2016-09-06 17:42:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 3,014 ms
コンパイル使用メモリ 74,720 KB
実行使用メモリ 54,092 KB
最終ジャッジ日時 2024-04-27 16:47:20
合計ジャッジ時間 5,107 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
54,056 KB
testcase_01 AC 112 ms
53,768 KB
testcase_02 AC 111 ms
53,992 KB
testcase_03 AC 102 ms
52,952 KB
testcase_04 AC 108 ms
53,752 KB
testcase_05 AC 109 ms
52,792 KB
testcase_06 AC 116 ms
54,092 KB
testcase_07 AC 111 ms
54,020 KB
testcase_08 AC 105 ms
52,916 KB
testcase_09 AC 97 ms
52,620 KB
testcase_10 AC 111 ms
53,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class a{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		
        int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int d=sc.nextInt();
		int e=sc.nextInt();
		int f=sc.nextInt();
		double score=0;
		
		int[] num = {a, b, c, d, e, f};
		
		Arrays.sort(num);
		
		for(int i=1; i<=4; i++){
			score+=num[i];
		}
		System.out.println(String.format("%.2f",score/4));
    }
}
0