Skip to content

Instantly share code, notes, and snippets.

@tralston
Last active December 16, 2015 01:49
Show Gist options
  • Save tralston/5358171 to your computer and use it in GitHub Desktop.
Save tralston/5358171 to your computer and use it in GitHub Desktop.
Project Euler: Problem 1
solution = 0
(1...1000).each do |n|
if n % 3 == 0 or n % 5 == 0
solution += n
end
end
solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment