結果

問題 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  
実行時間 39 ms / 1,500 ms
+ 552µs
コード長 303 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,339 ms
コンパイル使用メモリ 197,504 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2026-08-17 00:47:59
合計ジャッジ時間 9,007 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_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