結果
問題 |
No.219 巨大数の概算
|
ユーザー |
|
提出日時 | 2015-07-19 03:00:43 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 54 ms / 1,500 ms |
コード長 | 303 bytes |
コンパイル時間 | 4,791 ms |
コンパイル使用メモリ | 177,152 KB |
実行使用メモリ | 8,320 KB |
最終ジャッジ日時 | 2024-07-18 11:19:18 |
合計ジャッジ時間 | 9,174 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 51 |
コンパイルメッセージ
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
ソースコード
main = getLine >> getContents >>= mapM_ (putStrLn . solve . map read . words) . lines solve :: [Double] -> String solve [a, b] = x : ' ' : y : ' ' : show z where w = b * log a / log 10.0 z = truncate w [x, y] = take 2 . show . truncate $ 10.0 * 10.0 ** (w - fromIntegral z)