結果
問題 | No.394 ハーフパイプ(1) |
ユーザー | Goyotan |
提出日時 | 2016-07-18 15:45:28 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 132 ms / 2,000 ms |
コード長 | 720 bytes |
コンパイル時間 | 3,411 ms |
コンパイル使用メモリ | 75,408 KB |
実行使用メモリ | 54,404 KB |
最終ジャッジ日時 | 2024-04-23 16:26:36 |
合計ジャッジ時間 | 5,743 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 120 ms
53,116 KB |
testcase_01 | AC | 131 ms
54,160 KB |
testcase_02 | AC | 129 ms
54,116 KB |
testcase_03 | AC | 130 ms
54,404 KB |
testcase_04 | AC | 131 ms
54,264 KB |
testcase_05 | AC | 127 ms
53,804 KB |
testcase_06 | AC | 128 ms
54,060 KB |
testcase_07 | AC | 129 ms
54,020 KB |
testcase_08 | AC | 127 ms
54,220 KB |
testcase_09 | AC | 132 ms
53,844 KB |
testcase_10 | AC | 125 ms
53,752 KB |
ソースコード
import java.text.DecimalFormat; import java.util.Scanner; public class Study01 { public static void main(String[] args) { DecimalFormat ff = new DecimalFormat("#.#"); ff.setMinimumFractionDigits(2); ff.setMaximumFractionDigits(2); 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(ff.format(answer)); } }