This repository was archived by the owner on Sep 22, 2021. It is now read-only.

Description
Description of the Problem
For an integer n, we call k >= 2 a good base of n, if all digits of n base k are 1.
Now given a string representing n, you should return the smallest good base of n in string format.
Code
class Solution(object):
def smallestGoodBase(self, n):
"""
:type n: str
:rtype: str
"""
Link To The LeetCode Problem
LeetCode