Created
August 19, 2016 22:20
-
-
Save dflima/95cd850f1b191d88fe5dd89034c341fd 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
3 | |
2 | |
4 | |
6 | |
5 | |
7 | |
8 | |
0 | |
1 |
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 | |
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