mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<p>Implement <a href="http://www.cplusplus.com/reference/valarray/pow/" target="_blank">pow(x, n)</a>, which calculates <code>x</code> raised to the power <code>n</code> (i.e., <code>x<sup>n</sup></code>).</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> x = 2.00000, n = 10
|
||||
<strong>Output:</strong> 1024.00000
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> x = 2.10000, n = 3
|
||||
<strong>Output:</strong> 9.26100
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> x = 2.00000, n = -2
|
||||
@@ -29,5 +29,7 @@
|
||||
<ul>
|
||||
<li><code>-100.0 < x < 100.0</code></li>
|
||||
<li><code>-2<sup>31</sup> <= n <= 2<sup>31</sup>-1</code></li>
|
||||
<li><code>n</code> is an integer.</li>
|
||||
<li>Either <code>x</code> is not zero or <code>n > 0</code>.</li>
|
||||
<li><code>-10<sup>4</sup> <= x<sup>n</sup> <= 10<sup>4</sup></code></li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user