結果

問題 No.1042 愚直大学
ユーザー brthyyjpbrthyyjp
提出日時 2020-06-22 01:09:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 1,336 ms
コンパイル使用メモリ 86,776 KB
実行使用メモリ 76,764 KB
最終ジャッジ日時 2023-09-16 19:01:37
合計ジャッジ時間 4,034 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,540 KB
testcase_01 AC 77 ms
76,300 KB
testcase_02 AC 71 ms
76,504 KB
testcase_03 AC 74 ms
76,508 KB
testcase_04 AC 71 ms
76,472 KB
testcase_05 AC 73 ms
76,476 KB
testcase_06 AC 72 ms
76,520 KB
testcase_07 AC 74 ms
76,612 KB
testcase_08 AC 83 ms
76,312 KB
testcase_09 AC 71 ms
76,536 KB
testcase_10 AC 71 ms
76,296 KB
testcase_11 AC 74 ms
76,504 KB
testcase_12 AC 74 ms
76,348 KB
testcase_13 AC 72 ms
76,344 KB
testcase_14 AC 74 ms
76,300 KB
testcase_15 AC 73 ms
76,368 KB
testcase_16 AC 74 ms
76,304 KB
testcase_17 AC 76 ms
76,392 KB
testcase_18 AC 74 ms
76,536 KB
testcase_19 AC 73 ms
76,300 KB
testcase_20 AC 74 ms
76,764 KB
testcase_21 AC 73 ms
76,456 KB
testcase_22 AC 74 ms
76,416 KB
testcase_23 AC 73 ms
76,356 KB
testcase_24 AC 74 ms
76,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

import math

def is_ok(n):
    if p+q*n*math.log2(n)-n**2 >= 0:
        return True
    else:
        return False

l = 0
r = 10**18
for i in range(10**4):
    c = (l+r)/2
    if is_ok(c):
        l = c
    else:
        r = c
print(l)
0