結果

問題 No.1042 愚直大学
ユーザー c-yanc-yan
提出日時 2020-05-01 22:18:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 295 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 21,376 KB
最終ジャッジ日時 2024-12-25 12:29:19
合計ジャッジ時間 9,109 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log2


def is_ok(N):
    return N <= Q * log2(N) + P / N


P, Q = map(int, input().split())

ok = 1
ng = 10 ** 18
while ng - ok > 1:
    m = (ok + ng) // 2
    if is_ok(m):
        ok = m
    else:
        ng = m

t = ok
e = 1 / 2 ** 18
while is_ok(t):
    t += e

print(t - e)
0