結果
問題 |
No.1132 凸凹
|
ユーザー |
|
提出日時 | 2022-12-03 17:27:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 394 bytes |
コンパイル時間 | 676 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-10-10 20:06:18 |
合計ジャッジ時間 | 2,965 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
a,b,c,d,p,q = map(int,input().split()) def f(x): return a * (x ** 3) + b * (x ** 2) + c * x + d highest_y = -(1 << 60) highest_x = -1 lowest_y = 1 << 60 lowest_x = -1 for x in range(p, q + 1): y = f(x) if y > highest_y: highest_y = y highest_x = x if y < lowest_y: lowest_y = y lowest_x = x print(highest_y, highest_x, lowest_y, lowest_x)