Skip to content

Instantly share code, notes, and snippets.

@nesquena
Created May 17, 2009 06:26
Show Gist options
  • Save nesquena/112940 to your computer and use it in GitHub Desktop.
Save nesquena/112940 to your computer and use it in GitHub Desktop.
max = 0
999.downto(100) { |x|
999.downto(x) { |y|
prod = x * y
max = prod if (prod > max and prod.to_s == prod.to_s.reverse)
}
}
puts max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment