Skip to content

Instantly share code, notes, and snippets.

@aptinio
Created November 4, 2009 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aptinio/225796 to your computer and use it in GitHub Desktop.
Save aptinio/225796 to your computer and use it in GitHub Desktop.
Project Euler Problem 1
(1...1000).to_a.select {|n| n.remainder(3) == 0 || n.remainder(5) == 0}.reduce(:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment