Created
August 19, 2016 20:49
-
-
Save dflima/04dc8d6267f856ba633c16a2be2b0230 to your computer and use it in GitHub Desktop.
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
f :: Int -> [Int] -> [Int] | |
f n arr = concatMap (replicate n) arr | |
-- This part handles the Input and Output and can be used as it is. Do not modify this part. | |
main :: IO () | |
main = getContents >>= | |
mapM_ print. (\(n:arr) -> f n arr). map read. words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment