結果

問題 No.1230 Hall_and_me
ユーザー tentententen
提出日時 2021-03-17 13:56:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 2,053 ms
コンパイル使用メモリ 74,452 KB
実行使用メモリ 54,528 KB
最終ジャッジ日時 2024-04-27 00:43:43
合計ジャッジ時間 8,570 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
54,060 KB
testcase_01 AC 130 ms
53,972 KB
testcase_02 AC 130 ms
54,528 KB
testcase_03 AC 130 ms
54,084 KB
testcase_04 AC 132 ms
53,780 KB
testcase_05 AC 131 ms
53,936 KB
testcase_06 AC 130 ms
54,148 KB
testcase_07 AC 129 ms
54,196 KB
testcase_08 AC 130 ms
54,344 KB
testcase_09 AC 133 ms
53,892 KB
testcase_10 AC 131 ms
53,928 KB
testcase_11 AC 132 ms
54,020 KB
testcase_12 AC 133 ms
53,900 KB
testcase_13 AC 129 ms
53,896 KB
testcase_14 AC 130 ms
54,424 KB
testcase_15 AC 130 ms
54,292 KB
testcase_16 AC 131 ms
54,320 KB
testcase_17 AC 129 ms
54,172 KB
testcase_18 AC 132 ms
54,172 KB
testcase_19 AC 129 ms
54,108 KB
testcase_20 AC 130 ms
54,332 KB
testcase_21 AC 130 ms
54,356 KB
testcase_22 AC 131 ms
54,036 KB
testcase_23 AC 132 ms
54,188 KB
testcase_24 AC 130 ms
54,080 KB
testcase_25 AC 131 ms
54,060 KB
testcase_26 AC 131 ms
54,076 KB
testcase_27 AC 130 ms
54,152 KB
testcase_28 AC 129 ms
53,888 KB
testcase_29 AC 131 ms
53,928 KB
testcase_30 AC 129 ms
53,948 KB
testcase_31 AC 131 ms
54,124 KB
testcase_32 AC 130 ms
54,252 KB
testcase_33 AC 131 ms
53,852 KB
testcase_34 AC 130 ms
54,104 KB
testcase_35 AC 127 ms
53,996 KB
testcase_36 AC 133 ms
54,240 KB
testcase_37 AC 131 ms
54,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double total = 0;
        double[] rates = new double[3];
        for (int i = 0; i < 3; i++) {
            rates[i] = sc.nextInt();
            total += rates[i];
        }
        Arrays.sort(rates);
        System.out.println(Math.max(1 - rates[0] / total, rates[2] / total));
    }
}
0