結果

問題 No.219 巨大数の概算
コンテスト
ユーザー Michae'Gon
提出日時 2015-07-19 03:00:43
言語 Haskell
(9.14.1)
コンパイル:
ghc -rtsopts -with-rtsopts=-K1G -o a.out -O2 _filename_
実行:
./a.out
結果
AC  
実行時間 41 ms / 1,500 ms
コード長 303 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,283 ms
コンパイル使用メモリ 193,024 KB
実行使用メモリ 200,992 KB
最終ジャッジ日時 2026-04-02 03:45:09
合計ジャッジ時間 10,401 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #
raw source code

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)
0