Create a gist now

Instantly share code, notes, and snippets.

Project Euler Problem 8 with hs
import Data.Char
main = do
l <- getLine
let nums = map digitToInt l
putStrLn $ show $ maxNum nums
maxNum :: [Int] -> Int
maxNum [] = 0
maxNum all@(x:xs) = max (product (take 5 all)) (maxNum xs)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment