結果
| 問題 | No.2970 三次関数の絶対値 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-29 21:35:59 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 159 ms / 2,000 ms |
| + 155µs | |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 81,944 KB |
| 実行使用メモリ | 83,880 KB |
| 最終ジャッジ日時 | 2026-10-02 05:00:14 |
| 合計ジャッジ時間 | 10,622 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
import random
C = list(map(int, input().split()))
L, R = map(int, input().split())
def f(x):
return abs(C[0] + C[1] * x + C[2] * x * x + C[3] * x * x * x)
ans = 1 << 60
for _ in range(10 ** 7):
x = random.random() * (R - L) + L
ans = min(ans, f(x))
print(ans)