Skip to content

Instantly share code, notes, and snippets.

@jcouyang
Created March 7, 2017 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcouyang/8a52ee00ae384a4e8b76a6b3a35c876d to your computer and use it in GitHub Desktop.
Save jcouyang/8a52ee00ae384a4e8b76a6b3a35c876d to your computer and use it in GitHub Desktop.
Hackerrank IO
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