結果

問題 No.668 6.0*10^23
ユーザー ducktailducktail
提出日時 2018-04-12 13:02:23
言語 Haskell
(9.8.2)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 9,688 ms
コンパイル使用メモリ 161,500 KB
実行使用メモリ 14,252 KB
最終ジャッジ日時 2023-09-12 18:07:44
合計ジャッジ時間 11,729 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,244 KB
testcase_01 AC 22 ms
14,252 KB
testcase_02 AC 8 ms
12,100 KB
testcase_03 AC 5 ms
10,896 KB
testcase_04 AC 5 ms
11,496 KB
testcase_05 AC 4 ms
9,156 KB
testcase_06 AC 6 ms
11,472 KB
testcase_07 AC 2 ms
7,240 KB
testcase_08 AC 2 ms
7,252 KB
testcase_09 AC 2 ms
7,260 KB
testcase_10 AC 5 ms
10,352 KB
testcase_11 AC 12 ms
14,156 KB
testcase_12 AC 4 ms
9,940 KB
testcase_13 AC 12 ms
13,780 KB
testcase_14 AC 12 ms
12,668 KB
testcase_15 AC 3 ms
8,316 KB
testcase_16 AC 3 ms
9,176 KB
testcase_17 AC 12 ms
13,368 KB
testcase_18 AC 6 ms
11,676 KB
testcase_19 AC 4 ms
9,140 KB
testcase_20 AC 6 ms
11,876 KB
testcase_21 AC 5 ms
11,744 KB
testcase_22 AC 12 ms
13,504 KB
testcase_23 AC 7 ms
12,168 KB
testcase_24 AC 3 ms
8,708 KB
testcase_25 AC 12 ms
13,840 KB
testcase_26 AC 2 ms
7,584 KB
testcase_27 AC 12 ms
12,368 KB
testcase_28 AC 11 ms
13,760 KB
testcase_29 AC 5 ms
10,860 KB
testcase_30 AC 12 ms
14,140 KB
testcase_31 AC 6 ms
11,828 KB
testcase_32 AC 3 ms
8,460 KB
testcase_33 AC 12 ms
12,796 KB
testcase_34 AC 5 ms
10,132 KB
testcase_35 AC 4 ms
9,920 KB
testcase_36 AC 12 ms
12,568 KB
testcase_37 AC 12 ms
14,016 KB
testcase_38 AC 5 ms
11,696 KB
testcase_39 AC 7 ms
12,192 KB
testcase_40 AC 11 ms
13,700 KB
testcase_41 AC 12 ms
12,812 KB
testcase_42 AC 6 ms
11,320 KB
testcase_43 AC 12 ms
13,132 KB
testcase_44 AC 12 ms
14,220 KB
testcase_45 AC 3 ms
7,324 KB
testcase_46 AC 2 ms
7,260 KB
testcase_47 AC 2 ms
7,224 KB
testcase_48 AC 2 ms
7,252 KB
testcase_49 AC 2 ms
7,284 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 Text.Printf

main :: IO ()
main = getLine >>= solve

solve :: String -> IO ()
solve s = let (x1:x2:x3:_) = s
              n = read [x1, x2] + (if x3 < '5' then 0 else 1) :: Int
              (a,b) = divMod n 10
              l = length s - 1
          in printf "%d.%d*10^%d\n" (if a == 10 then 1 else a) (if a == 10 then 0 else b) (if a == 10 then l+1 else l)
0