結果
| 問題 | No.2970 三次関数の絶対値 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-30 03:10:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 253 bytes |
| 記録 | |
| コンパイル時間 | 587 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 127,008 KB |
| 最終ジャッジ日時 | 2026-05-23 20:15:20 |
| 合計ジャッジ時間 | 7,612 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 49 |
ソースコード
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))