Created
September 20, 2011 22:13
-
-
Save BlakeWilliams/1230575 to your computer and use it in GitHub Desktop.
Project Euler #1 in one line
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
(1..999).select { |x| (x % 3) == 0 || (x % 5) == 0 }.reduce(:+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment