Created
November 5, 2009 03:58
-
-
Save aptinio/226698 to your computer and use it in GitHub Desktop.
Project Euler Problem 10
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
require 'mathn' | |
Prime.new.inject(0) { |sum, n| | |
break(sum) if n >= 2_000_000 | |
sum + n | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment