Skip to content

Instantly share code, notes, and snippets.

@hanabokuro
Last active August 29, 2015 14:02
Show Gist options
  • Save hanabokuro/ff0ae98ffd84bd504364 to your computer and use it in GitHub Desktop.
Save hanabokuro/ff0ae98ffd84bd504364 to your computer and use it in GitHub Desktop.
111111 * 111111 = ?
(2..36).each do |base|
n = '1' * (base - 1)
puts "base: #{base} #{n} * #{n} = #{(n.to_i(base) ** 2).to_s(base)}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment