個人的神殿

プログラミング

Pythonで10進数からn進数に変換する方法

def base10int(value, base):
    if (int(value / base)):
        return base10int(int(value / base), base) + str(value % base)
    return str(value % base)