結果
問題 | No.605 板挟みの球面 |
ユーザー | Haar |
提出日時 | 2018-09-24 22:16:45 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 7,728 ms |
コンパイル使用メモリ | 163,308 KB |
実行使用メモリ | 9,560 KB |
最終ジャッジ日時 | 2023-10-24 22:18:03 |
合計ジャッジ時間 | 8,529 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 6 ms
9,540 KB |
testcase_01 | AC | 5 ms
9,528 KB |
testcase_02 | AC | 2 ms
5,504 KB |
testcase_03 | AC | 8 ms
9,560 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
numericalIntegration :: Double -> Double -> Double -> (Double -> Double) -> Double numericalIntegration d a b f | b < a = numericalIntegration d b a f | otherwise = sum [(f (a+d*i) + f (a+d*(i+1)))*d/2 | i<-[0..n-1]] where n = (b-a)/d main = do a <- readLn :: IO Double b <- readLn :: IO Double let d = 0.00001 print $ numericalIntegration d a b (\x -> 2*pi)