結果

問題 No.99 ジャンピング駒
ユーザー krotonkroton
提出日時 2014-12-09 23:50:02
言語 Haskell
(9.6.2)
結果
AC  
実行時間 413 ms / 5,000 ms
コード長 186 bytes
コンパイル時間 11,074 ms
コンパイル使用メモリ 160,160 KB
実行使用メモリ 60,260 KB
最終ジャッジ日時 2023-09-02 12:25:34
合計ジャッジ時間 10,176 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 402 ms
60,236 KB
testcase_01 AC 392 ms
60,228 KB
testcase_02 AC 413 ms
60,152 KB
testcase_03 AC 412 ms
60,260 KB
testcase_04 AC 413 ms
60,244 KB
testcase_05 AC 412 ms
60,136 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 )

Main.hs:5:1: warning: [GHC-94817] [-Wtabs]
    Tab character found here, and in two further locations.
    Suggested fix: Please use spaces instead.
  |
5 |         _ <- getLine
  | ^^^^^^^^
[2 of 2] Linking a.out

ソースコード

diff #

readInt :: String -> Integer
readInt = read

main = do
	_ <- getLine
	xs <- fmap (map readInt . words) getLine
	print $ abs . sum $ map (\x -> if x `mod` 2 == 0 then 1 else -1) xs 
0