結果

問題 No.3001 ヘビ文字列
ユーザー gew1fw
提出日時 2025-06-12 14:48:46
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 367 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 82,716 KB
実行使用メモリ 91,144 KB
最終ジャッジ日時 2025-06-12 14:52:21
合計ジャッジ時間 25,517 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 83
権限があれば一括ダウンロードができます

ソースコード

diff #

X, Y = map(float, input().split())
X = round(X, 5)
Y = round(Y, 5)

if X == 0.0:
    print("0.00000000000 0.00000000000")
elif X == 1.0:
    val = 1.0 - Y
    print("{0:.11f} {0:.11f}".format(val))
else:
    p_min = max(0.0, (X - Y) / X)
    p_max = min(1.0, (1 - Y) / X)
    P_max = X * p_max
    P_min = X * p_min
    print("{0:.11f} {1:.11f}".format(P_max, P_min))
0