Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- isDiv :: Int -> [Int] -> Bool
- isDiv x [] = True
- isDiv x (y:ys)
- | (x `mod` y) > 0 = False
- | otherwise = isDiv x ys
- answer :: Int
- answer = head [x | x <- [50400,50440..], isDiv x [20,19..1] == True]
- main = putStrLn $ "Problem 5 Answer: " ++ show answer
Add Comment
Please, Sign In to add comment