Submission #1520496
Source Code Expand
main = do [a, b] <- map read . words <$> getLine :: IO Integer print $ max a b
Submission Info
Submission Time | |
---|---|
Task | A - 正直者 |
User | Gash788 |
Language | Haskell (GHC 7.10.3) |
Score | 0 |
Code Size | 84 Byte |
Status | CE |
Compile Error
Main.hs:2:3: Couldn't match expected type ‘Integer’ with actual type ‘[r0]’ In the pattern: [a, b] In a stmt of a 'do' block: [a, b] <- map read . words <$> getLine :: IO Integer In the expression: do { [a, b] <- map read . words <$> getLine :: IO Integer; print $ max a b } Main.hs:2:13: Couldn't match type ‘[b0]’ with ‘Integer’ Expected type: [String] -> Integer Actual type: [String] -> [b0] In the first argument of ‘(.)’, namely ‘map read’ In the first argument of ‘(<$>)’, namely ‘map read . words’