結果

問題 No.3001 確率論ってこういうものですよね
ユーザー vabuffvabuff
提出日時 2017-09-28 22:27:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-04-27 15:13:46
合計ジャッジ時間 1,192 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,624 KB
testcase_01 AC 32 ms
10,496 KB
testcase_02 AC 33 ms
10,496 KB
testcase_03 AC 31 ms
10,496 KB
testcase_04 AC 30 ms
10,496 KB
testcase_05 AC 30 ms
10,496 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# -*- coding: utf-8 -*-



def answer(pmax, pmin):
    print("{:.11f} {:.11f}".format(pmax, pmin))

def main():
    X, Y = map(float, input().split())

    if X == 0.0:
        answer(0.0, 0.0)
        return

    pmax = X * (1-Y)/X
    pmin = X * ((1-Y)/X + (1-1/X))
    answer(pmax, pmin)

if __name__ == "__main__": main()
0