euler/ruby/euler010.rb

6 lines
93 B
Ruby
Raw Normal View History

require_relative 'euler'
2014-04-25 23:59:14 +00:00
def solution
Prime.take_while { |x| x < 2000000 }.inject(:+)
end