0372. Super Pow
https://leetcode.com/problems/super-pow
Description
Your task is to calculate ab
mod 1337
where a
is a positive integer and b
is an extremely large positive integer given in the form of an array.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
1 <= a <= 231 - 1
1 <= b.length <= 2000
0 <= b[i] <= 9
b
doesn't contain leading zeros.
ac
Last updated