Guest User

Untitled

a guest
Apr 25th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. isDiv :: Int -> [Int] -> Bool
  2. isDiv x [] = True
  3. isDiv x (y:ys)
  4. | (x `mod` y) > 0 = False
  5. | otherwise = isDiv x ys
  6.  
  7. answer :: Int
  8. answer = head [x | x <- [50400,50440..], isDiv x [20,19..1] == True]
  9.  
  10. main = putStrLn $ "Problem 5 Answer: " ++ show answer
Add Comment
Please, Sign In to add comment