Skip to content

Instantly share code, notes, and snippets.

@GeoffCrittenden
Created March 26, 2014 19:45
Show Gist options
  • Save GeoffCrittenden/9791614 to your computer and use it in GitHub Desktop.
Save GeoffCrittenden/9791614 to your computer and use it in GitHub Desktop.
Project Euler - Problem #1 Solution
sum = (1..999).select { |x| x % 3 == 0 || x % 5 == 0 }.inject(:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment