結果

問題 No.3062 A + B
ユーザー poapoapoapoa
提出日時 2020-07-29 23:52:49
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 581 bytes
コンパイル時間 2,030 ms
コンパイル使用メモリ 167,912 KB
実行使用メモリ 7,468 KB
最終ジャッジ日時 2023-09-13 04:38:40
合計ジャッジ時間 3,375 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
7,212 KB
testcase_04 AC 2 ms
7,232 KB
testcase_05 WA -
testcase_06 AC 2 ms
7,284 KB
testcase_07 WA -
testcase_08 AC 3 ms
7,344 KB
testcase_09 AC 3 ms
7,284 KB
testcase_10 AC 2 ms
7,268 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 qualified Control.Arrow         as Arrow
import qualified Control.Monad         as Monad
import qualified Data.Char             as Char
import qualified Data.List             as List
import qualified Data.ByteString.Char8 as BSC8
import qualified Data.Vector.Unboxed   as VU

-- | 一行入力 Intリスト
getInt :: IO [Int]
getInt = List.unfoldr f <$> BSC8.getLine
  where
    -- f :: BSC8.ByteString -> Maybe (Int, BSC8.ByteString)
    f s = do
      (n, s') <- BSC8.readInt s
      return (n, BSC8.dropWhile Char.isSpace s')
main :: IO ()
main = sum <$> getInt >>= print
0