Skip to content

Instantly share code, notes, and snippets.

@masahixixi
Created October 30, 2012 07:17
Show Gist options
  • Save masahixixi/3978756 to your computer and use it in GitHub Desktop.
Save masahixixi/3978756 to your computer and use it in GitHub Desktop.
ProjectEuler #10
require "prime"
num = 3
sum = 2
while num <= 2000000
sum += num if num.prime?
num += 2
end
p sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment