結果
問題 |
No.428 小数から逃げる夢
|
ユーザー |
|
提出日時 | 2018-07-10 14:53:48 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 8,707 ms |
コンパイル使用メモリ | 173,312 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-21 20:30:07 |
合計ジャッジ時間 | 11,586 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Applicative ((<$>)) main :: IO () main = solve <$> readLn >>= putStrLn solve :: Integer -> String solve n = (if null x then "0" else x) ++ "." ++ y where d = 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991 nd = show $ n * d (x,y) = splitAt (length nd - 190) nd