Skip to content

Instantly share code, notes, and snippets.

@hyuki0000
Created June 1, 2016 06:10
Show Gist options
  • Save hyuki0000/1bbf043ce951129ee625e7a242e8ad76 to your computer and use it in GitHub Desktop.
Save hyuki0000/1bbf043ce951129ee625e7a242e8ad76 to your computer and use it in GitHub Desktop.
N = 2016_06_01
(1..N).each do |n|
if (N / n) * n == N
puts "#{N} can be divided by #{n}."
end
end
__END__
20160601 can be divided by 1.
20160601 can be divided by 20160601.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment