Skip to content

Instantly share code, notes, and snippets.

@negamorgan
Created April 30, 2014 20:39
Show Gist options
  • Select an option

  • Save negamorgan/d011ecc436b9ad35b505 to your computer and use it in GitHub Desktop.

Select an option

Save negamorgan/d011ecc436b9ad35b505 to your computer and use it in GitHub Desktop.
euler-problem-1.rb
1.upto(999).select do |n|
n % 3 == 0 || n % 5 == 0
end.reduce(:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment