結果

問題 No.289 数字を全て足そう
ユーザー US18650US18650
提出日時 2017-05-14 05:42:58
言語 Haskell
(9.8.2)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 220 bytes
コンパイル時間 616 ms
コンパイル使用メモリ 158,192 KB
実行使用メモリ 11,500 KB
最終ジャッジ日時 2023-10-13 17:07:46
合計ジャッジ時間 1,918 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,988 KB
testcase_01 AC 2 ms
6,896 KB
testcase_02 AC 2 ms
7,008 KB
testcase_03 AC 2 ms
6,604 KB
testcase_04 AC 2 ms
6,832 KB
testcase_05 AC 3 ms
8,352 KB
testcase_06 AC 3 ms
7,744 KB
testcase_07 AC 6 ms
10,984 KB
testcase_08 AC 5 ms
11,020 KB
testcase_09 AC 4 ms
8,132 KB
testcase_10 AC 4 ms
8,936 KB
testcase_11 AC 5 ms
10,672 KB
testcase_12 AC 5 ms
11,024 KB
testcase_13 AC 5 ms
9,976 KB
testcase_14 AC 6 ms
11,012 KB
testcase_15 AC 5 ms
10,612 KB
testcase_16 AC 4 ms
9,416 KB
testcase_17 AC 6 ms
10,964 KB
testcase_18 AC 6 ms
11,012 KB
testcase_19 AC 5 ms
10,732 KB
testcase_20 AC 6 ms
10,980 KB
testcase_21 AC 2 ms
6,940 KB
testcase_22 AC 6 ms
11,104 KB
testcase_23 AC 22 ms
11,500 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 Data.Char (isDigit)

readDigits :: IO [Int]
readDigits = map read <$> words <$> getLine

main :: IO ()
main = do
    line <- getLine
    let x = [read [c] | c<-line, isDigit c] :: [Int]
    putStrLn . show $ sum x
0