結果

問題 No.1042 愚直大学
ユーザー uni_pythonuni_python
提出日時 2020-06-21 14:39:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 460 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 76,796 KB
最終ジャッジ日時 2023-09-16 18:21:36
合計ジャッジ時間 3,342 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
76,588 KB
testcase_01 AC 84 ms
76,776 KB
testcase_02 AC 80 ms
76,740 KB
testcase_03 AC 85 ms
76,596 KB
testcase_04 AC 81 ms
76,764 KB
testcase_05 AC 82 ms
76,796 KB
testcase_06 AC 81 ms
76,560 KB
testcase_07 AC 83 ms
76,556 KB
testcase_08 AC 82 ms
76,604 KB
testcase_09 AC 81 ms
76,680 KB
testcase_10 AC 82 ms
76,416 KB
testcase_11 AC 83 ms
76,712 KB
testcase_12 AC 82 ms
76,572 KB
testcase_13 AC 82 ms
76,736 KB
testcase_14 AC 84 ms
76,668 KB
testcase_15 AC 84 ms
76,680 KB
testcase_16 AC 83 ms
76,776 KB
testcase_17 AC 83 ms
76,684 KB
testcase_18 AC 81 ms
76,680 KB
testcase_19 AC 83 ms
76,752 KB
testcase_20 AC 84 ms
76,680 KB
testcase_21 AC 82 ms
76,608 KB
testcase_22 AC 84 ms
76,412 KB
testcase_23 AC 82 ms
76,708 KB
testcase_24 AC 84 ms
76,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
mod=10**9+7

def main():
    import math
    P,Q=MI()
    
    def f(x):
        return x**2<=P+Q*x*math.log2(x)
    
    ok=1
    ng=10**16
    
    for _ in range(10**5):
        x=(ok+ng)/2
        if f(x):
            ok=x
        else:
            ng=x
            
    print(ok)
    
    


main()
0