結果

問題 No.159 刺さらないUSB
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-08-16 23:09:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 1,000 ms
コード長 509 bytes
コンパイル時間 1,933 ms
コンパイル使用メモリ 72,340 KB
実行使用メモリ 58,060 KB
最終ジャッジ日時 2023-09-14 16:53:03
合計ジャッジ時間 5,799 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
56,108 KB
testcase_01 AC 140 ms
56,056 KB
testcase_02 AC 138 ms
55,944 KB
testcase_03 AC 139 ms
55,856 KB
testcase_04 AC 140 ms
56,096 KB
testcase_05 AC 140 ms
55,884 KB
testcase_06 AC 136 ms
55,880 KB
testcase_07 AC 139 ms
56,056 KB
testcase_08 AC 138 ms
56,060 KB
testcase_09 AC 142 ms
55,728 KB
testcase_10 AC 140 ms
58,060 KB
testcase_11 AC 138 ms
56,004 KB
testcase_12 AC 138 ms
56,220 KB
testcase_13 AC 137 ms
56,056 KB
testcase_14 AC 137 ms
55,920 KB
testcase_15 AC 137 ms
55,856 KB
testcase_16 AC 138 ms
55,896 KB
testcase_17 AC 137 ms
55,712 KB
testcase_18 AC 137 ms
55,408 KB
testcase_19 AC 137 ms
56,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double p = in.nextDouble();
        double q = in.nextDouble();

        double a1 = 0.0, a2 = 0.0; // P1とP2

        a1 = (1.0 - p) * q;
        a2 = p * (1.0 - q) * q;

        if(a1 < a2) System.out.println("YES");
        else System.out.println("NO");

        in.close();
    }
}
0