結果
問題 | No.582 キャンディー・ボックス3 |
ユーザー |
![]() |
提出日時 | 2017-10-27 22:54:53 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 9,510 ms |
コンパイル使用メモリ | 173,824 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 22:27:03 |
合計ジャッジ時間 | 10,398 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 6 WA * 11 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
module Main (main) where import Control.Applicative import Control.Monad main :: IO () main = do { n <- readLn :: IO Int ; cs <- map read . words <$> getLine :: IO [Int] ; let answer = foldl (\a x -> if even x then a + 1 else a - 1) 0 cs ; putStrLn $ if answer > 0 then "A" else "B" }