結果

問題 No.1042 愚直大学
ユーザー roarisroaris
提出日時 2020-05-08 00:09:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 71,900 KB
最終ジャッジ日時 2023-09-16 08:14:38
合計ジャッジ時間 3,209 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,588 KB
testcase_01 AC 72 ms
71,556 KB
testcase_02 AC 73 ms
71,348 KB
testcase_03 AC 70 ms
71,164 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 71 ms
71,228 KB
testcase_07 AC 70 ms
71,296 KB
testcase_08 AC 70 ms
71,224 KB
testcase_09 AC 71 ms
71,396 KB
testcase_10 AC 70 ms
71,304 KB
testcase_11 AC 70 ms
71,552 KB
testcase_12 AC 69 ms
71,428 KB
testcase_13 AC 71 ms
71,304 KB
testcase_14 AC 70 ms
71,268 KB
testcase_15 AC 72 ms
71,432 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 73 ms
71,524 KB
testcase_23 AC 73 ms
71,396 KB
testcase_24 AC 72 ms
71,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *

def binary_search():
    l, r = 1, 10**9
    
    while r-l>=1e-6:
        m = (l+r)/2
        
        if m**2<=P+Q*m*log(m, 2):
            l = m
        else:
            r = m

    return l

P, Q = map(int, input().split())
print(binary_search())
0