結果

問題 No.1132 凸凹
ユーザー 37zigen
提出日時 2020-07-28 14:57:44
言語 Python3
(3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 27 ms / 2,000 ms
+ 175µs
コード長 263 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 63 ms
コンパイル使用メモリ 14,592 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2026-10-16 15:22:11
合計ジャッジ時間 2,799 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a,b,c,d,p,q=map(int,input().split())

def f(x):
    return a*(x**3)+b*(x**2)+c*x+d

y=[f(x) for x in range(p,q+1)]

m=min(y)
M=max(y)
mv=Mv=-1
for x in range(p,q+1):
    if mv==-1 and f(x)==m:
        mv=x
    if Mv==-1 and f(x)==M:
        Mv=x

print(M,Mv,m,mv)
0