Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/qiyuangong/leetcode
/ powmod
Method
powmod
python/372_Super_Pow.py:19–24 ·
view source on GitHub ↗
(self, a, k)
Source
from the content-addressed store, hash-verified
17
self.powmod(a, last_digit) % self.base
18
19
def
powmod(self, a, k):
20
a %= self.base
21
result = 1
22
for
i in range(k):
23
result = (result * a) % self.base
24
return
result
Callers
1
superPow
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected