AtCoder Beginner Contest 003

Submission #1520529

Source codeソースコード

main = putStrLn =<< p . all s . zip <$> getLine <*> getLine

s (x, y)
  | x == y = True
  | x == '@' && y `elem` "atcoder" = True
  | y == '@' && x `elem` "atcoder" = True
  | otherwise = False

p True = "You can win"
p False = "You will lose"

Submission

Task問題 B - AtCoderトランプ
User nameユーザ名 Gash788
Created time投稿日時
Language言語 Haskell (GHC 7.10.3)
Status状態 CE
Score得点 -
Source lengthソースコード長 252 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ


Main.hs:1:21:
Couldn't match type ‘[Char]’ with ‘String -> String’
Expected type: Bool -> String -> String
Actual type: Bool -> [Char]
In the first argument of ‘(.)’, namely ‘p’
In the first argument of ‘(<$>)’, namely ‘p . all s . zip’

Main.hs:1:33:
Couldn't match type ‘[(Char, b0)]’ with ‘(Char, Char)’
Expected type: [Char] -> [b0] -> (Char, Char)
Actual type: [Char] -> [b0] -> [(Char, b0)]
In the second argument of ‘(.)’, namely ‘zip’
In the second argument of ‘(.)’, namely ‘all s . zip’

Test case