Skip to content

Instantly share code, notes, and snippets.

@Chuongv
Last active December 25, 2015 11:48
Show Gist options
  • Save Chuongv/c8b7d2741a80d1133a55 to your computer and use it in GitHub Desktop.
Save Chuongv/c8b7d2741a80d1133a55 to your computer and use it in GitHub Desktop.
ProjectEuler5
listofnumbers=(20..1000000000)
def divisible?(x)
range=(1..10)
range.each {|y|
counter=0
if x%y!=0
break
else
x%y==0
counter+=1
if counter==10
print x
break
end
end}
end
divisible?(2520)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment