Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Good Radix by Renelvon
def checkio(s):
# Evaluating each digit in base 36 reveals the minimum
# radix in which this digit can be present.
min_possible_radix = max(int(c, 36) + 1 for c in s)
for r in range(min_possible_radix, 37):
if int(s, r) % (r - 1) == 0:
return r
return 0
May 15, 2014