Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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)

aomoriringo commented Sep 9, 2012


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