1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 19:31:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part6

This commit is contained in:
2022-03-27 20:56:26 +08:00
parent c11d601602
commit 08d1f2a596
1096 changed files with 88216 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
<p>给你一个非负整数 <code>x</code> ,计算并返回&nbsp;<code>x</code>&nbsp;<strong>算术平方根</strong></p>
<p>由于返回类型是整数,结果只保留 <strong>整数部分 </strong>,小数部分将被 <strong>舍去 。</strong></p>
<p><strong>注意:</strong>不允许使用任何内置指数函数和算符,例如 <code>pow(x, 0.5)</code> 或者 <code>x ** 0.5</code></p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>x = 4
<strong>输出:</strong>2
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>x = 8
<strong>输出:</strong>2
<strong>解释:</strong>8 的算术平方根是 2.82842..., 由于返回类型是整数,小数部分将被舍去。
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= x &lt;= 2<sup>31</sup> - 1</code></li>
</ul>