Skip to content

Instantly share code, notes, and snippets.

@dflima
Created August 19, 2016 21:48
Show Gist options
  • Save dflima/14c2525eaa4d99fbac308872fdb394c2 to your computer and use it in GitHub Desktop.
Save dflima/14c2525eaa4d99fbac308872fdb394c2 to your computer and use it in GitHub Desktop.
f :: [Int] -> [Int]
f lst = map ((!!)lst) [1,3..length lst-1]
-- This part deals with the Input and Output and can be used as it is. Do not modify it.
main = do
inputdata <- getContents
mapM_ (putStrLn. show). f. map read. lines $ inputdata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment