Can someone tell me what is wrong with this code? I have used int() instead of round(), but why it is not working?


#1

class Solution:
# @param A : integer
# @return an integer
def isPower(self, A):
for p in range(2,33):
a = int(A**(1/p))
if a**p==A:
return 1
return 0