Created
June 1, 2016 06:10
-
-
Save hyuki0000/1bbf043ce951129ee625e7a242e8ad76 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
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