We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd21960 commit 2cee4eeCopy full SHA for 2cee4ee
scripts/algorithms/S/Super Pow/Super Pow.py
@@ -1,9 +1,10 @@
1
+# Runtime: 260 ms (Top 32.64%) | Memory: 13.9 MB (Top 58.72%)
2
class Solution:
- def superPow(self, a: int, b: List[int]) -> int:
3
- mod = 1337
4
- ans = 1
+ def superPow(self, a: int, b: List[int]) -> int:
+ mod = 1337
5
+ ans = 1
6
- for power in b:
7
- ans = ((pow(ans,10)%mod)*(pow(a,power)%mod))%mod
+ for power in b:
8
+ ans = ((pow(ans,10)%mod)*(pow(a,power)%mod))%mod
9
- return ans
10
+ return ans
0 commit comments