def power(a,n):
if n==0:
return 1
res,temp=1,a
while n:
if n&1:
res*=temp
n>>=1
print("n:",n)
temp*=temp
return res
print(power(2,5))
def power(a,n):
if n==0:
return 1
res,temp=1,a
while n:
if n&1:
res*=temp
n>>=1
print("n:",n)
temp*=temp
return res
print(power(2,5))