結果

問題 No.159 刺さらないUSB
ユーザー uafr_cs
提出日時 2015-05-15 17:48:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 147 ms / 1,000 ms
コード長 509 bytes
コンパイル時間 1,984 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 41,716 KB
最終ジャッジ日時 2024-07-01 23:46:10
合計ジャッジ時間 6,073 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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