結果

問題 No.159 刺さらないUSB
ユーザー uafr_csuafr_cs
提出日時 2015-05-15 17:48:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 1,000 ms
コード長 509 bytes
コンパイル時間 2,095 ms
コンパイル使用メモリ 71,960 KB
実行使用メモリ 40,544 KB
最終ジャッジ日時 2023-09-14 16:38:34
合計ジャッジ時間 6,121 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
39,736 KB
testcase_01 AC 134 ms
39,776 KB
testcase_02 AC 138 ms
39,588 KB
testcase_03 AC 136 ms
39,780 KB
testcase_04 AC 135 ms
39,728 KB
testcase_05 AC 137 ms
40,024 KB
testcase_06 AC 143 ms
39,420 KB
testcase_07 AC 138 ms
39,716 KB
testcase_08 AC 137 ms
40,108 KB
testcase_09 AC 135 ms
40,116 KB
testcase_10 AC 136 ms
40,376 KB
testcase_11 AC 141 ms
40,544 KB
testcase_12 AC 137 ms
39,584 KB
testcase_13 AC 137 ms
40,244 KB
testcase_14 AC 139 ms
39,712 KB
testcase_15 AC 139 ms
40,004 KB
testcase_16 AC 139 ms
39,676 KB
testcase_17 AC 137 ms
40,176 KB
testcase_18 AC 137 ms
40,240 KB
testcase_19 AC 144 ms
39,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		
		final double p = sc.nextDouble();
		final double q = sc.nextDouble();
		
		final double P1 = (1 - p) * q;
		final double P2 = p * (1 - q) * q;
		
		System.out.println(P1 < P2 ? "YES" : "NO");
	}
}
0