Smallest Good Base
Given an integer n represented as a string, return the smallest good base of n.
We call k >= 2 a good base of n if all digits of n in base k are 1's.
Example 1
Input
n = "13"Output
"3"13 base 3 is 111.
Example 2
Input
n = "4681"Output
"8"4681 base 8 is 11111.
Constraints
nis an integer in the range[3, 10^18].ndoes not contain any leading zeros.