結果

問題 No.1132 凸凹
ユーザー ID 21712
提出日時 2024-12-25 23:38:42
言語 Go
(1.23.4)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 14,462 ms
コンパイル使用メモリ 237,028 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-25 23:39:25
合計ジャッジ時間 16,303 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 1 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import . "fmt"

func main() {
	var a,b,c,d,p,q int64
	Scan(&a,&b,&c,&d,&p,&q)
	var max,maxx,min,minx int64
	for x:=p; x<=q; x++ {
		f := a*x*x*x+b*x*x+c*x+d
		if x==p || f > max {
			max=f
			maxx=x
		}
		if x==p || f < min {
			min=f
			minx=x
		}
	}
	Println(max,min,maxx,minx)
}
0