結果

問題 No.159 刺さらないUSB
ユーザー nak2yoshi
提出日時 2016-02-22 18:20:08
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 305 bytes
コンパイル時間 716 ms
コンパイル使用メモリ 104,588 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 02:59:23
合計ジャッジ時間 1,411 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm;

void main()
{
    auto input = readln.split.to!(real[]);
    auto p = input[0], q = input[1];

    auto P1 = (1 - p) * q;
    auto P2 = p * (1 - q) * q;
    (P1 < P2 ? "YES" : "NO").writeln;
}
0