by croes · 6mo ago · 0 comments
The product is always 1 and some other digit but not one short of 20
And we only have two multiplications with their result, that’s hardly a pattern
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def base_conv(num, base):
if num == 0:
return "0"
if base > 36:
return "too big of base"
result = ""
while num > 0:
result = digits[num%base] + result
num //= base
return result
i = 5;
b = 18;
while b < 37:
print(base_conv(4\*i,b))
i += 1
b += 3
results:
12
13
14
15
16
17
18Beyond this you need to get more creative with your digit symbols.
*edit: bad formatting