Created
October 1, 2012 08:44
-
-
Save mmitou/3810373 to your computer and use it in GitHub Desktop.
project euler 1
This file contains hidden or 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
| -- 10未満の自然数のうち、3 もしくは 5 の倍数になっているものは 3, 5, 6, 9 の4つがあり、 これらの合計は 23 になる。 | |
| -- 同じようにして、1,000 未満の 3 か 5 の倍数になっている数字の合計を求めよ。 | |
| euler1 = sum $ filter (\n -> n `mod` 3 == 0 || n `mod` 5 == 0) [1..999] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment