Submission #226106
Source Code Expand
import Control.Applicative main :: IO () main = do [a, b] <- map read <$> getLine :: IO [Int] print $ b - a + 1
Submission Info
Submission Time | |
---|---|
Task | A - アルバム |
User | motosuke |
Language | Haskell (GHC 7.4.1) |
Score | 0 |
Code Size | 126 Byte |
Status | CE |
Compile Error
Main.hs:5:28: Couldn't match expected type `String' with actual type `Char' Expected type: IO [String] Actual type: IO String In the second argument of `(<$>)', namely `getLine' In a stmt of a 'do' block: [a, b] <- map read <$> getLine :: IO [Int]