LeetCode Super Pow 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. Example1:
a = 2 b = [3] Result: 8Example2:
a = 2 b = [1,0] Result: 1024
快速幂的进阶版,超级幂。要求
LeetCode Super Pow 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. Example1:
a = 2 b = [3] Result: 8Example2:
a = 2 b = [1,0] Result: 1024