結果

問題 No.1042 愚直大学
ユーザー m4c_physics99m4c_physics99
提出日時 2020-05-01 21:52:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 223 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 8,540 KB
最終ジャッジ日時 2023-08-26 09:22:56
合計ジャッジ時間 1,349 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
8,452 KB
testcase_01 AC 13 ms
8,352 KB
testcase_02 AC 15 ms
8,392 KB
testcase_03 AC 14 ms
8,392 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 15 ms
8,540 KB
testcase_07 AC 14 ms
8,436 KB
testcase_08 AC 13 ms
8,280 KB
testcase_09 AC 13 ms
8,356 KB
testcase_10 AC 14 ms
8,332 KB
testcase_11 AC 14 ms
8,352 KB
testcase_12 AC 13 ms
8,336 KB
testcase_13 AC 13 ms
8,428 KB
testcase_14 AC 14 ms
8,440 KB
testcase_15 AC 12 ms
8,336 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 13 ms
8,440 KB
testcase_23 AC 13 ms
8,280 KB
testcase_24 AC 13 ms
8,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log2
p,q = map(int,input().split())
def f(n) :
    return p+q*n*log2(n)-n*n
top = 10**9
bot = 1
while top - bot > 10**(-6):
    mid = (top + bot)/2
    if f(mid) >= 0:bot = mid
    else:top = mid
print(bot)
0