landscapemi的博客

###### leetcode:数学：spuer pow（372）

https://leetcode.com/problems/super-pow/

http://blog.csdn.net/happyxuma1991/article/details/51867822

class Solution {
const int base = 1337;
int powmod(int a, int k) //a^k mod 1337 where 0 <= k <= 10
{
a %= base;
int result = 1;
for (int i = 0; i < k; ++i)
result = (result * a) % base;
return result;
}
public:
int superPow(int a, vector<int>& b) {
if (b.empty()) return 1;
int last_digit = b.back();
b.pop_back();
return powmod(superPow(a, b), 10) * powmod(a, last_digit) % base;
}
};  

#### Leetcode 372. Super Pow 快速幂计算 解题报告

2016-07-07 19:20:19

#### LeetCode 372. Super Pow解题思路(超详细)

2016-11-18 19:57:31

#### LeetCode 第 372 题 (Super Pow)

2016-07-12 21:02:17

#### [leetcode] 372. Super Pow 解题报告

2016-07-08 14:00:48

#### LeetCode 372 Super Pow

2016-07-11 10:13:34

#### [java][leetcode 372]Super Pow

2016-07-22 16:48:15

#### leecode 解题总结：372. Super Pow

2017-03-03 12:03:40

#### Math-372-Super Pow

2018-01-30 12:16:06

#### Leetcode (372) Super Pow

2016-11-17 00:00:41

#### LeetCode问题 pow(x,n)

2013-10-02 15:44:56

## 不良信息举报

leetcode:数学：spuer pow（372）