Skip to content

Instantly share code, notes, and snippets.

@l4u
Created January 19, 2014 04:04
Show Gist options
  • Save l4u/8500371 to your computer and use it in GitHub Desktop.
Save l4u/8500371 to your computer and use it in GitHub Desktop.
nums = [0,9].repeated_permutation(18).map(&:join).map(&:to_i)
nums.shift
n = gets.to_i
1.upto n do
j = gets.to_i
nums.each do |i|
if i % j == 0
puts i
break
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment