結果

問題 No.1042 愚直大学
ユーザー tikitaka1201tikitaka1201
提出日時 2020-07-08 21:58:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 61,340 KB
最終ジャッジ日時 2024-04-15 06:36:20
合計ジャッジ時間 2,138 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
59,356 KB
testcase_01 AC 43 ms
60,144 KB
testcase_02 AC 42 ms
60,108 KB
testcase_03 AC 43 ms
60,004 KB
testcase_04 AC 44 ms
60,632 KB
testcase_05 AC 42 ms
60,824 KB
testcase_06 AC 46 ms
60,272 KB
testcase_07 AC 43 ms
60,432 KB
testcase_08 AC 47 ms
61,096 KB
testcase_09 AC 42 ms
59,968 KB
testcase_10 AC 43 ms
60,164 KB
testcase_11 AC 42 ms
59,760 KB
testcase_12 AC 43 ms
60,544 KB
testcase_13 AC 42 ms
60,508 KB
testcase_14 AC 44 ms
60,484 KB
testcase_15 AC 43 ms
60,352 KB
testcase_16 AC 44 ms
61,268 KB
testcase_17 AC 42 ms
60,060 KB
testcase_18 AC 42 ms
60,224 KB
testcase_19 AC 43 ms
59,948 KB
testcase_20 AC 43 ms
59,772 KB
testcase_21 AC 43 ms
60,140 KB
testcase_22 AC 43 ms
61,340 KB
testcase_23 AC 44 ms
59,732 KB
testcase_24 AC 43 ms
59,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

l=1
r=10**12

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

for _ in range(10000):
    mid=(r+l)/2
    if takawin(mid):
        l=mid
    else:
        r=mid

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