We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
First find all palindroms in base 10. There is 1998 palindroms in base 10 below 10^6 . Then iterate over all of them which are below n and convert them to base k and check if it is palindrom or not.
Project Euler #36: Double-base palindromes
You are viewing a single comment's thread. Return to all comments →
First find all palindroms in base 10. There is 1998 palindroms in base 10 below 10^6 . Then iterate over all of them which are below n and convert them to base k and check if it is palindrom or not.
Python 3 Solution :