結果

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

テストケース

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

ソースコード

diff #

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