結果
| 問題 |
No.1009 面積の求め方
|
| コンテスト | |
| ユーザー |
ID 21712
|
| 提出日時 | 2025-01-01 16:14:12 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 224 bytes |
| コンパイル時間 | 12,300 ms |
| コンパイル使用メモリ | 222,284 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-01 16:14:27 |
| 合計ジャッジ時間 | 13,533 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 2 WA * 14 |
ソースコード
package main
import . "fmt"
func main() {
var a,b,s float64
Scan(&a,&b)
f:=func(x float64) float64 {
return (x-a)*(x-b)
}
const n=1e6
for x:=1;x<n;x++ {
s+=(b-a)/n*f((b-a)*float64(x)/n+a)
}
Printf("%.8f\n",s)
}
ID 21712