|
|
back to boardShow all messages Hide all messagesI have WA#1 but algo was right. I use this construction: import qualified Data.ByteString.Char8 as C8 ... input <- C8.getLine C8.putStr $ result input ---------- But I have always WA#1. At my PC (Linux) I have right answers. then i tried: input' <- C8.getLine let input = if (C8.index input' (-1 + C8.length input')) == '\r' then C8.init input' else input' -------- So, i removed last character '\r' from line if it exists. And after this my code was accepted! |
|
|