結果

問題 No.394 ハーフパイプ(1)
ユーザー villachvillach
提出日時 2016-09-15 14:51:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 458 bytes
コンパイル時間 3,472 ms
コンパイル使用メモリ 75,996 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2023-08-10 20:37:44
合計ジャッジ時間 5,698 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,712 KB
testcase_01 AC 118 ms
55,856 KB
testcase_02 AC 112 ms
56,356 KB
testcase_03 AC 124 ms
55,792 KB
testcase_04 AC 125 ms
55,788 KB
testcase_05 AC 117 ms
55,548 KB
testcase_06 AC 115 ms
55,556 KB
testcase_07 AC 114 ms
56,196 KB
testcase_08 AC 112 ms
53,576 KB
testcase_09 AC 115 ms
55,804 KB
testcase_10 AC 126 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Helloworld {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> hoge = new ArrayList<>(6);
		int i;
		float x = 0;
		
		for(i=0;i<6;++i){
			hoge.add(sc.nextInt());
		}
		
		hoge.remove(hoge.indexOf(Collections.max(hoge)));
		hoge.remove(hoge.indexOf(Collections.min(hoge)));
		
		for(int z: hoge){
			x += z;
		}
		
		System.out.printf("%.2f",x / 4);
	}
}
0