結果

問題 No.159 刺さらないUSB
ユーザー kenkooookenkoooo
提出日時 2015-03-07 02:29:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 1,000 ms
コード長 357 bytes
コンパイル時間 2,147 ms
コンパイル使用メモリ 71,336 KB
実行使用メモリ 56,220 KB
最終ジャッジ日時 2023-09-14 16:35:19
合計ジャッジ時間 5,841 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
56,220 KB
testcase_01 AC 142 ms
55,856 KB
testcase_02 AC 140 ms
55,764 KB
testcase_03 AC 139 ms
55,764 KB
testcase_04 AC 139 ms
55,624 KB
testcase_05 AC 140 ms
55,996 KB
testcase_06 AC 140 ms
55,904 KB
testcase_07 AC 141 ms
55,620 KB
testcase_08 AC 144 ms
56,112 KB
testcase_09 AC 143 ms
56,160 KB
testcase_10 AC 143 ms
55,980 KB
testcase_11 AC 141 ms
55,916 KB
testcase_12 AC 141 ms
55,984 KB
testcase_13 AC 142 ms
56,064 KB
testcase_14 AC 137 ms
55,472 KB
testcase_15 AC 139 ms
55,828 KB
testcase_16 AC 138 ms
56,120 KB
testcase_17 AC 140 ms
55,832 KB
testcase_18 AC 138 ms
56,016 KB
testcase_19 AC 139 ms
55,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double p = sc.nextDouble();
		double q = sc.nextDouble();
		sc.close();
		double P1 = (1 - p) * q;
		double P2 = p * (1 - q) * q;
		if (P1 < P2) {
			System.out.println("YES");
			return;
		}
		System.out.println("NO");
	}

}
0