結果
問題 | No.105 arcの六角ボルト |
ユーザー | aimy |
提出日時 | 2017-04-25 17:02:20 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 182 ms / 5,000 ms |
コード長 | 329 bytes |
コンパイル時間 | 800 ms |
コンパイル使用メモリ | 163,828 KB |
実行使用メモリ | 12,208 KB |
最終ジャッジ日時 | 2023-10-11 09:41:45 |
合計ジャッジ時間 | 1,807 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Text.Printf main = interact $ unlines . map (printf "%.9f" . bolt) . read' . tail . lines where read' [] = [] read' xs = map (map read . words) xys : read' xs' where (xys,xs') = splitAt 6 (tail xs) bolt :: [[Double]] -> Double bolt = head . filter (\d -> -1 < d && d < 51) . map (\[x,y] -> atan (y/x) * (180/pi))