Last active
December 16, 2015 14:19
-
-
Save alfo/5447484 to your computer and use it in GitHub Desktop.
JMC 2006 Question 22 answered in 3 lines. "A positive whole number less than 100 has remainder 2 when divided by 3, remainder 3 when divided by 4, and remainder 4 when divided by 5. What is the remainder when the number is divided by 7?"
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
for n in 1..99 do | |
p n % 7 if n % 3 == 2 and n % 4 == 3 and n % 5 == 4 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment