結果
| 問題 |
No.2970 三次関数の絶対値
|
| コンテスト | |
| ユーザー |
lignan
|
| 提出日時 | 2024-12-19 06:41:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,344 ms / 2,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 500 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 76,192 KB |
| 最終ジャッジ日時 | 2024-12-19 06:41:22 |
| 合計ジャッジ時間 | 15,044 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
from math import sqrt
C0,C1,C2,C3=map(int,input().split())
L,R=map(int,input().split())
def f(x):
return C0+C1*x+C2*x**2+C3*x**3
def absf(x):
return abs(C0+C1*x+C2*x**2+C3*x**3)
N=1000000
ans=10**10
for i in range(L*N,R*N+1):
ans=min(ans,absf(i/N))
print(ans)
lignan