結果
問題 |
No.2970 三次関数の絶対値
|
ユーザー |
|
提出日時 | 2024-11-30 03:10:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 253 bytes |
コンパイル時間 | 246 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 196,248 KB |
最終ジャッジ日時 | 2024-11-30 03:12:51 |
合計ジャッジ時間 | 108,049 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 50 |
ソースコード
import numpy as np from scipy.optimize import shgo c0, c1, c2, c3 = map(int, input().split()) l, r = map(int, input().split()) def f(x): return abs(c0 + c1 * x + c2 * x**2 + c3 * x**3) res = shgo(f, bounds=[(l, r)]) print('{:f}'.format(res.fun))