結果

問題 No.219 巨大数の概算
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-30 19:36:23
言語 Haskell
(9.8.2)
結果
AC  
実行時間 63 ms / 1,500 ms
コード長 380 bytes
コンパイル時間 4,305 ms
コンパイル使用メモリ 165,636 KB
実行使用メモリ 11,716 KB
最終ジャッジ日時 2023-09-25 14:56:53
合計ジャッジ時間 10,310 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
11,560 KB
testcase_01 AC 62 ms
11,528 KB
testcase_02 AC 62 ms
11,636 KB
testcase_03 AC 62 ms
11,620 KB
testcase_04 AC 62 ms
11,560 KB
testcase_05 AC 2 ms
7,428 KB
testcase_06 AC 12 ms
11,432 KB
testcase_07 AC 2 ms
7,276 KB
testcase_08 AC 12 ms
11,520 KB
testcase_09 AC 2 ms
7,208 KB
testcase_10 AC 62 ms
11,652 KB
testcase_11 AC 63 ms
11,560 KB
testcase_12 AC 62 ms
11,612 KB
testcase_13 AC 62 ms
11,632 KB
testcase_14 AC 62 ms
11,528 KB
testcase_15 AC 62 ms
11,480 KB
testcase_16 AC 62 ms
11,592 KB
testcase_17 AC 62 ms
11,528 KB
testcase_18 AC 62 ms
11,580 KB
testcase_19 AC 62 ms
11,608 KB
testcase_20 AC 62 ms
11,632 KB
testcase_21 AC 62 ms
11,588 KB
testcase_22 AC 62 ms
11,560 KB
testcase_23 AC 62 ms
11,576 KB
testcase_24 AC 62 ms
11,588 KB
testcase_25 AC 62 ms
11,636 KB
testcase_26 AC 62 ms
11,560 KB
testcase_27 AC 62 ms
11,472 KB
testcase_28 AC 62 ms
11,568 KB
testcase_29 AC 62 ms
11,508 KB
testcase_30 AC 62 ms
11,556 KB
testcase_31 AC 62 ms
11,568 KB
testcase_32 AC 62 ms
11,628 KB
testcase_33 AC 62 ms
11,716 KB
testcase_34 AC 62 ms
11,676 KB
testcase_35 AC 63 ms
11,608 KB
testcase_36 AC 62 ms
11,648 KB
testcase_37 AC 62 ms
11,596 KB
testcase_38 AC 62 ms
11,604 KB
testcase_39 AC 62 ms
11,640 KB
testcase_40 AC 62 ms
11,596 KB
testcase_41 AC 62 ms
11,492 KB
testcase_42 AC 62 ms
11,644 KB
testcase_43 AC 63 ms
11,492 KB
testcase_44 AC 62 ms
11,516 KB
testcase_45 AC 62 ms
11,524 KB
testcase_46 AC 62 ms
11,540 KB
testcase_47 AC 62 ms
11,636 KB
testcase_48 AC 62 ms
11,616 KB
testcase_49 AC 62 ms
11,572 KB
testcase_50 AC 62 ms
11,584 KB
testcase_51 AC 2 ms
7,352 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 #

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

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