Skip to content

Instantly share code, notes, and snippets.

@alfo
Last active December 16, 2015 14:19
Show Gist options
  • Save alfo/5447484 to your computer and use it in GitHub Desktop.
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?"
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