結果
| 問題 | No.1132 凸凹 |
| ユーザー |
|
| 提出日時 | 2022-12-03 17:27:55 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 463 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-04-26 23:28:51 |
| 合計ジャッジ時間 | 4,078 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)