# pow(x, n) ```python= def pow(x, n): res = 1 while (n > 0): # If y is odd, multiply # x with result if ((n & 1) == 1) : res = res * x # n must be even # now y = y/2 n = n >> 1 # Change x to x^2 x = x * x return res ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up