Some numbers can be represented as perfect powers of other numbers. A number x can be represented as x = base^power for some integer base and power.
Given an integer x you have to find the largest value of power, such that base is also an integer.
Sample Input:
9
Sample Output:
2
0
as an input case? What about negative integers? \$\endgroup\$1
? \$\endgroup\$