結果

問題 No.394 ハーフパイプ(1)
ユーザー Taka
提出日時 2016-09-06 17:42:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 3,268 ms
コンパイル使用メモリ 74,928 KB
実行使用メモリ 54,240 KB
最終ジャッジ日時 2024-11-15 20:36:48
合計ジャッジ時間 5,321 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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