結果

問題 No.159 刺さらないUSB
ユーザー tsunabittsunabit
提出日時 2019-05-12 15:30:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 1,000 ms
コード長 517 bytes
コンパイル時間 3,280 ms
コンパイル使用メモリ 72,172 KB
実行使用メモリ 57,732 KB
最終ジャッジ日時 2023-09-14 17:07:30
合計ジャッジ時間 7,278 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
56,468 KB
testcase_01 AC 139 ms
56,204 KB
testcase_02 AC 137 ms
55,500 KB
testcase_03 AC 137 ms
57,732 KB
testcase_04 AC 137 ms
56,004 KB
testcase_05 AC 137 ms
55,704 KB
testcase_06 AC 137 ms
55,988 KB
testcase_07 AC 138 ms
55,936 KB
testcase_08 AC 138 ms
56,204 KB
testcase_09 AC 137 ms
55,700 KB
testcase_10 AC 137 ms
56,188 KB
testcase_11 AC 138 ms
56,456 KB
testcase_12 AC 138 ms
54,040 KB
testcase_13 AC 136 ms
55,680 KB
testcase_14 AC 138 ms
55,916 KB
testcase_15 AC 135 ms
55,528 KB
testcase_16 AC 137 ms
55,796 KB
testcase_17 AC 138 ms
56,216 KB
testcase_18 AC 138 ms
56,172 KB
testcase_19 AC 143 ms
56,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;

public class No159 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        double p = sc.nextDouble(), q = sc.nextDouble();
        double p1 = (1 - p) * q;
        double p2 = (1 - q) * p * q;
        
        if(p1 < p2) {
        	System.out.println("YES");
        }else {
        	System.out.println("NO");
        }
    }
}
0