結果

問題 No.1042 愚直大学
ユーザー tikitaka1201tikitaka1201
提出日時 2020-07-08 21:57:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 82,848 KB
実行使用メモリ 54,252 KB
最終ジャッジ日時 2024-04-15 06:34:04
合計ジャッジ時間 2,046 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,308 KB
testcase_01 AC 37 ms
54,044 KB
testcase_02 AC 37 ms
54,088 KB
testcase_03 AC 37 ms
53,868 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 36 ms
52,384 KB
testcase_07 AC 37 ms
52,856 KB
testcase_08 AC 41 ms
53,452 KB
testcase_09 AC 38 ms
53,516 KB
testcase_10 AC 37 ms
52,912 KB
testcase_11 AC 36 ms
52,388 KB
testcase_12 AC 36 ms
53,488 KB
testcase_13 AC 38 ms
52,656 KB
testcase_14 AC 38 ms
53,944 KB
testcase_15 AC 37 ms
52,776 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 36 ms
53,408 KB
testcase_19 WA -
testcase_20 AC 36 ms
53,152 KB
testcase_21 AC 38 ms
52,896 KB
testcase_22 AC 36 ms
53,400 KB
testcase_23 AC 37 ms
53,516 KB
testcase_24 AC 37 ms
54,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p,q=map(int,input().split())

l=1
r=10**10

import math

def takawin(x):
    if abs(x-1)<10**-6:
        return True
    elif (x**2-p)/x<q*math.log2(x):
        return True
    else: return False

while r-l>10**(-6):
    mid=(r+l)/2
    if takawin(mid):
        l=mid
    else:
        r=mid

print("{:.8f}".format(r))
0