LeetCode 483: Smallest Good Base
Problem Restatement We are given an integer n as a string. We need to return the smallest base k such that the representation of n in base k contains only digit 1 . For example: 13 in base 3 = 111 because: 13 = 1 * 3^2 + 1 * 3^1 + 1 * 3^0 So for n = "13" , the answer is: "3" A good base must satisfy...