John, a space ambassador, is trying to negotiate a ceasefire between two aliens. Bazork stands 3 feet tall with 5 fingers in total. Gazorp is 9 feet in length and 6 inches in width with 3 fingers on each hand. The issue they have is religion. They both worship palindromes, and they each say that their own palindrome is the true one.
They try to explain this to John, and because they use different languages and number systems with different bases, John needs to use his translation machine. However, John gets confused because the numbers they each worship seem to be the same. He checks again and is still confused.
What is the smallest number this could be (in decimal representation)?
Hint: Bazork uses base 5 and Gazorp uses base 6, just as we humans use base 10 because of the number of our fingers.
Bonus: Generalize to all possible solutions (not just the smallest) in an equation.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
67 is the smallest number that is a palindrome in base 5 and base 6. Here is some code:
I'd like to know the bonus formula, and also any tips for uploading code to brilliant? It seems kinda ugly right now.