結果

問題 No.159 刺さらないUSB
ユーザー k_kadorak_kadora
提出日時 2015-05-27 03:43:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 1,000 ms
コード長 306 bytes
コンパイル時間 6,033 ms
コンパイル使用メモリ 72,544 KB
実行使用メモリ 56,292 KB
最終ジャッジ日時 2023-09-14 16:39:05
合計ジャッジ時間 7,227 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
54,040 KB
testcase_01 AC 144 ms
55,852 KB
testcase_02 AC 143 ms
56,044 KB
testcase_03 AC 141 ms
55,480 KB
testcase_04 AC 141 ms
56,196 KB
testcase_05 AC 143 ms
56,004 KB
testcase_06 AC 141 ms
56,292 KB
testcase_07 AC 143 ms
55,968 KB
testcase_08 AC 142 ms
55,992 KB
testcase_09 AC 143 ms
55,884 KB
testcase_10 AC 141 ms
56,004 KB
testcase_11 AC 142 ms
55,856 KB
testcase_12 AC 144 ms
56,168 KB
testcase_13 AC 142 ms
54,008 KB
testcase_14 AC 143 ms
55,956 KB
testcase_15 AC 141 ms
56,036 KB
testcase_16 AC 141 ms
55,900 KB
testcase_17 AC 144 ms
55,972 KB
testcase_18 AC 141 ms
55,628 KB
testcase_19 AC 142 ms
55,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Usb{
	public static void main(String[] arg){
		double p,q,p1,p2;
		Scanner sc = new Scanner(System.in);
		p = sc.nextDouble();
		q = sc.nextDouble();
		p1 = (1-p)*q;
		p2 = p*(1-q)*q;
		if(p1<p2){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}
}
0