結果

問題 No.219 巨大数の概算
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-30 19:33:41
言語 Haskell
(9.8.2)
結果
RE  
実行時間 -
コード長 390 bytes
コンパイル時間 9,371 ms
コンパイル使用メモリ 166,408 KB
実行使用メモリ 11,988 KB
最終ジャッジ日時 2023-10-11 06:15:00
合計ジャッジ時間 9,405 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
11,852 KB
testcase_01 AC 92 ms
11,864 KB
testcase_02 AC 82 ms
11,780 KB
testcase_03 AC 82 ms
11,820 KB
testcase_04 AC 82 ms
11,988 KB
testcase_05 AC 3 ms
7,716 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 3 ms
7,568 KB
testcase_10 AC 83 ms
11,820 KB
testcase_11 AC 92 ms
11,872 KB
testcase_12 AC 82 ms
11,824 KB
testcase_13 AC 82 ms
11,860 KB
testcase_14 AC 82 ms
11,976 KB
testcase_15 AC 82 ms
11,760 KB
testcase_16 AC 83 ms
11,824 KB
testcase_17 AC 92 ms
11,928 KB
testcase_18 AC 82 ms
11,812 KB
testcase_19 AC 83 ms
11,852 KB
testcase_20 AC 82 ms
11,816 KB
testcase_21 AC 82 ms
11,840 KB
testcase_22 RE -
testcase_23 AC 93 ms
11,864 KB
testcase_24 AC 82 ms
11,832 KB
testcase_25 AC 82 ms
11,848 KB
testcase_26 AC 82 ms
11,756 KB
testcase_27 AC 83 ms
11,836 KB
testcase_28 AC 82 ms
11,768 KB
testcase_29 AC 92 ms
11,768 KB
testcase_30 AC 92 ms
11,768 KB
testcase_31 AC 82 ms
11,824 KB
testcase_32 AC 83 ms
11,868 KB
testcase_33 AC 91 ms
11,808 KB
testcase_34 AC 83 ms
11,872 KB
testcase_35 AC 82 ms
11,844 KB
testcase_36 AC 82 ms
11,848 KB
testcase_37 AC 83 ms
11,816 KB
testcase_38 AC 83 ms
11,828 KB
testcase_39 AC 82 ms
11,880 KB
testcase_40 AC 82 ms
11,824 KB
testcase_41 AC 83 ms
11,752 KB
testcase_42 AC 82 ms
11,832 KB
testcase_43 AC 82 ms
11,824 KB
testcase_44 AC 82 ms
11,828 KB
testcase_45 AC 82 ms
11,836 KB
testcase_46 AC 82 ms
11,796 KB
testcase_47 AC 83 ms
11,864 KB
testcase_48 AC 82 ms
11,836 KB
testcase_49 AC 83 ms
11,932 KB
testcase_50 AC 82 ms
11,772 KB
testcase_51 AC 3 ms
7,548 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

import Numeric (floatToDigits)

calc :: Double -> Double -> [Int]
calc a b = [x, y, z]
    where
        l = b * logBase 10 a
        z = floor l
        ((x : y : _), _) = floatToDigits 10 $ 10 ** (l - fromIntegral z)

main :: IO ()
main = getLine >> getContents >>= putStr . unlines . map unwords . map (map show) .
    map (\(a : b : _) -> calc a b) . map (map read) . map words . lines
0