My code for this questions

programming
Tags: #<Tag:0x00007f1828fbaa30>

#1

class Solution:
# @param A : integer
# @return an integer
def isPower(self, A):
if A==1 :
return 1
k=int(A0.5+1)
for i in range(2,k):
temp=0
n=2
while (temp<A):
temp=i
n
if temp<A:
n+=1
elif temp>A:
n=2
else:
return 1
return 0