結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー US18650US18650
提出日時 2017-05-14 02:27:15
言語 Haskell
(9.8.2)
結果
AC  
実行時間 422 ms / 3,000 ms
コード長 220 bytes
コンパイル時間 725 ms
コンパイル使用メモリ 157,636 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2023-08-26 17:05:46
合計ジャッジ時間 5,168 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,988 KB
testcase_01 AC 3 ms
7,040 KB
testcase_02 AC 2 ms
7,104 KB
testcase_03 AC 3 ms
7,012 KB
testcase_04 AC 2 ms
7,120 KB
testcase_05 AC 4 ms
8,108 KB
testcase_06 AC 12 ms
11,152 KB
testcase_07 AC 32 ms
11,240 KB
testcase_08 AC 122 ms
11,372 KB
testcase_09 AC 182 ms
11,288 KB
testcase_10 AC 362 ms
11,292 KB
testcase_11 AC 382 ms
11,392 KB
testcase_12 AC 382 ms
11,252 KB
testcase_13 AC 402 ms
11,332 KB
testcase_14 AC 392 ms
11,364 KB
testcase_15 AC 382 ms
11,304 KB
testcase_16 AC 422 ms
11,392 KB
testcase_17 AC 3 ms
7,000 KB
testcase_18 AC 3 ms
7,160 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 #

readDigits = map read <$> words <$> getLine :: IO [Integer]
readDigits'= map read <$> lines <$> getContents :: IO [Integer]

main :: IO ()
main = do
    n <- readLn :: IO Integer
    putStrLn . show . sum =<< readDigits'
0