結果

問題 No.1042 愚直大学
ユーザー maspymaspy
提出日時 2020-05-01 22:49:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 336 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 56,448 KB
最終ジャッジ日時 2023-08-26 15:31:37
合計ジャッジ時間 9,615 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 324 ms
56,180 KB
testcase_01 AC 327 ms
56,320 KB
testcase_02 AC 324 ms
56,344 KB
testcase_03 AC 325 ms
56,352 KB
testcase_04 AC 320 ms
56,216 KB
testcase_05 AC 326 ms
56,240 KB
testcase_06 AC 336 ms
56,264 KB
testcase_07 AC 317 ms
56,304 KB
testcase_08 AC 325 ms
56,440 KB
testcase_09 AC 321 ms
56,448 KB
testcase_10 AC 322 ms
56,208 KB
testcase_11 AC 319 ms
56,252 KB
testcase_12 AC 320 ms
56,340 KB
testcase_13 AC 317 ms
56,356 KB
testcase_14 AC 324 ms
56,240 KB
testcase_15 AC 320 ms
56,208 KB
testcase_16 AC 320 ms
56,180 KB
testcase_17 AC 310 ms
56,364 KB
testcase_18 AC 316 ms
56,208 KB
testcase_19 AC 319 ms
56,136 KB
testcase_20 AC 316 ms
56,188 KB
testcase_21 AC 315 ms
56,292 KB
testcase_22 AC 317 ms
56,188 KB
testcase_23 AC 319 ms
56,344 KB
testcase_24 AC 319 ms
56,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.optimize import *
from math import log2
P,Q=map(int,input().split())

def f(x):
    return x * x - Q * x * log2(x) - P

x = newton(f, x0=10**20, maxiter=1000)
print(x)
0