結果
| 問題 | No.2970 三次関数の絶対値 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-29 21:35:45 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 85,412 KB |
| 実行使用メモリ | 64,360 KB |
| 最終ジャッジ日時 | 2026-05-23 14:24:11 |
| 合計ジャッジ時間 | 4,764 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 45 WA * 5 |
ソースコード
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 ** 5):
x = random.random() * (R - L) + L
ans = min(ans, f(x))
print(ans)