1
# Runtime: 260 ms (Top 32.64%) | Memory: 13.9 MB (Top 58.72%)
2
class Solution:
3
def superPow(self, a: int, b: List[int]) -> int:
4
mod = 1337
5
ans = 1
6

7
for power in b:
8
ans = ((pow(ans, 10) % mod) * (pow(a, power) % mod)) % mod
9

10
return ans

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0