def foo(num, base):
if num >= base:
foo(num // base, base)
print(num % base, end = '')
num = eval(input())
base = eval(input())
foo(num, base)
经典写法之进制转换。
最新推荐文章于 2024-11-12 23:15:59 发布
def foo(num, base):
if num >= base:
foo(num // base, base)
print(num % base, end = '')
num = eval(input())
base = eval(input())
foo(num, base)