Created
July 26, 2012 22:58
-
-
Save rhysd/3185120 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
main = print . head $ [ x | x <- [1..], allDivided 20 x ] | |
where | |
allDivided 1 _ = True | |
allDivided n x = x `mod` n == 0 && allDivided (n-1) x | |
-- もっと真面目に解ける. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment