Submission #1873753
Source Code Expand
main=interact$(++"\n") show.(\(s:c:_)->if s>=div c 2 then div c 2 else((c-s*2)`div`4)+s).map(read::String->Int).words
Submission Info
Submission Time | |
---|---|
Task | C - Scc Puzzle |
User | amanuko |
Language | Haskell (GHC 7.10.3) |
Score | 0 |
Code Size | 119 Byte |
Status | CE |
Compile Error
Main.hs:1:15: Couldn't match expected type ‘Int -> String’ with actual type ‘[Char]’ Possible cause: ‘++ "\n"’ is applied to too many arguments In the first argument of ‘(.)’, namely ‘(++ "\n") show’ In the second argument of ‘($)’, namely ‘(++ "\n") show . (\ (s : c : _) -> if s >= div c 2 then div c 2 else ((c - s * 2) `div` 4) + s) . map (read :: String -> Int) . words’ Main.hs:1:24: Couldn't match expected type ‘[Char]’ with actual type ‘a0 -> String’ Probable cause: ‘show’ is applied to too few arguments In the first argument of ‘++ "\n"’, namely ‘show’ In the first argument of ‘(.)’, namely ‘(++ "\n") show’