結果

問題 No.394 ハーフパイプ(1)
ユーザー GoyotanGoyotan
提出日時 2016-07-18 15:35:53
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 562 bytes
コンパイル時間 3,060 ms
コンパイル使用メモリ 74,480 KB
実行使用メモリ 41,332 KB
最終ジャッジ日時 2024-04-23 16:25:58
合計ジャッジ時間 4,876 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.Scanner;

public class Study01 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		String [] q = a.split(" ");
		int[] z = new int[6];
		int max = 0,min = 100;
		for(int i=0;i<q.length;i++){
			z[i]= Integer.parseInt(q[i]);
			//System.out.println(z[i]);
			max = Math.max(max,z[i]);
			min = Math.min(min,z[i]);
		}
		int ll = max + min;
		int all = 0;
		for(int i=0;i<z.length;i++){
			all += z[i];
		}
		double answer = all - ll;
		answer /= 4;
		System.out.println(answer);
	}

}
0