Took a bit of time to crack this down


def isPower(self, A):
for power in range(2,33):
return 1
return 0

#executed successfully


How did you come up with the number 33?


Because the question has mentioned about 32 bit signed integer. So we need only 32 places. Reply again if you did not get what’s happening with the code.