Created
March 7, 2017 08:44
-
-
Save jcouyang/8a52ee00ae384a4e8b76a6b3a35c876d to your computer and use it in GitHub Desktop.
Hackerrank IO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad | |
import Data.List | |
solution n = | |
undefined | |
readInt :: IO Int | |
readInt = readLn | |
getInputs :: Int -> IO [Int] | |
getInputs lines = replicateM lines readInt | |
main = do | |
times <- readInt | |
inputs <- getInputs times | |
putStrLn $ intercalate "\n" $ map (show . solution) inputs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment