Skip to content

Instantly share code, notes, and snippets.

@dflima
Created August 19, 2016 22:20
Show Gist options
  • Save dflima/95cd850f1b191d88fe5dd89034c341fd to your computer and use it in GitHub Desktop.
Save dflima/95cd850f1b191d88fe5dd89034c341fd to your computer and use it in GitHub Desktop.
3
2
4
6
5
7
8
0
1
f :: [Int] -> Int
f arr = sum (filter odd arr)
-- This part handles the Input/Output and can be used as it is. Do not change or modify it.
main = do
inputdata <- getContents
putStrLn $ show $ f $ map (read :: String -> Int) $ lines inputdata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment