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\$ – Thomas Eding Aug 23 '11 at 16:101
? \$\endgroup\$ – Martin Ender Feb 26 '16 at 18:46