Created
August 16, 2013 14:18
-
-
Save 1dolinski/6250325 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. | |
#What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? | |
def euler4 | |
8 | |
end | |
require 'rspec' | |
describe :euler4 do | |
it 'has a remander of 0 when divided by range' do | |
(1..3).each do |divisor| | |
it "has a remainder of 0 when divided by #{divisor}" do | |
expect(euler4 % divisor).to eq(0) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment