1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/超级次方 [super-pow].html
2022-03-29 12:43:11 +08:00

43 lines
957 B
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>你的任务是计算 <code>a<sup>b</sup></code> 对 <code>1337</code> 取模,<code>a</code> 是一个正整数,<code>b</code> 是一个非常大的正整数且会以数组形式给出。</p>
<p> </p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>a = 2, b = [3]
<strong>输出:</strong>8
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>a = 2, b = [1,0]
<strong>输出:</strong>1024
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>a = 1, b = [4,3,3,8,5,2]
<strong>输出:</strong>1
</pre>
<p><strong>示例 4</strong></p>
<pre>
<strong>输入:</strong>a = 2147483647, b = [2,0,0]
<strong>输出:</strong>1198
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 <= a <= 2<sup>31</sup> - 1</code></li>
<li><code>1 <= b.length <= 2000</code></li>
<li><code>0 <= b[i] <= 9</code></li>
<li><code>b</code> 不含前导 0</li>
</ul>