Skip to content

Commit a211717

Browse files
authored
docs: update description to lc problem No.0069 (doocs#704)
No.0069.Sqrt(x)
1 parent 69f1d79 commit a211717

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

Diff for: solution/0000-0099/0069.Sqrt(x)/README.md

+21-11
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,36 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>实现&nbsp;<code>int sqrt(int x)</code>&nbsp;函数。</p>
9+
<p>给你一个非负整数 <code>x</code> ,计算并返回&nbsp;<code>x</code>&nbsp;的 <strong>算术平方根</strong> 。</p>
1010

11-
<p>计算并返回&nbsp;<em>x</em>&nbsp;的平方根,其中&nbsp;<em>x </em>是非负整数。</p>
11+
<p>由于返回类型是整数,结果只保留 <strong>整数部分 </strong>,小数部分将被 <strong>舍去 。</strong></p>
1212

13-
<p>由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。</p>
13+
<p><strong>注意:</strong>不允许使用任何内置指数函数和算符,例如 <code>pow(x, 0.5)</code> 或者 <code>x ** 0.5</code> 。</p>
1414

15-
<p><strong>示例 1:</strong></p>
15+
<p>&nbsp;</p>
1616

17-
<pre><strong>输入:</strong> 4
18-
<strong>输出:</strong> 2
17+
<p><strong>示例 1:</strong></p>
18+
<pre>
19+
<strong>输入:</strong>x = 4
20+
<strong>输出:</strong>2
1921
</pre>
2022

21-
<p><strong>示例 2:</strong></p>
23+
<p><strong>示例 2</strong></p>
2224

23-
<pre><strong>输入:</strong> 8
24-
<strong>输出:</strong> 2
25-
<strong>说明:</strong> 根号 8 是 2.82842...,
26-
&nbsp; 由于返回类型是整数,小数部分将被舍去。
25+
<pre>
26+
<strong>输入:</strong>x = 8
27+
<strong>输出:</strong>2
28+
<strong>解释:</strong>8 的算术平方根是 2.82842..., 由于返回类型是整数,小数部分将被舍去。
2729
</pre>
2830

31+
<p>&nbsp;</p>
32+
33+
<p><strong>提示:</strong></p>
34+
35+
<ul>
36+
<li><code>0 &lt;= x &lt;= 2<sup>31</sup> - 1</code></li>
37+
</ul>
38+
2939
## 解法
3040

3141
<!-- 这里可写通用的实现逻辑 -->

Diff for: solution/0000-0099/0069.Sqrt(x)/README_EN.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
<p>Since the return type&nbsp;is an integer, the decimal digits are <strong>truncated</strong>, and only <strong>the integer part</strong> of the result&nbsp;is returned.</p>
1010

11+
<p><strong>Note:&nbsp;</strong>You are not allowed to use any built-in exponent function or operator, such as <code>pow(x, 0.5)</code> or&nbsp;<code>x ** 0.5</code>.</p>
12+
1113
<p>&nbsp;</p>
1214
<p><strong>Example 1:</strong></p>
1315

@@ -18,16 +20,15 @@
1820

1921
<p><strong>Example 2:</strong></p>
2022

21-
<pre>
22-
<strong>Input:</strong> x = 8
23+
<pre><strong>Input:</strong> x = 8
2324
<strong>Output:</strong> 2
2425
<strong>Explanation:</strong> The square root of 8 is 2.82842..., and since the decimal part is truncated, 2 is returned.</pre>
2526

2627
<p>&nbsp;</p>
2728
<p><strong>Constraints:</strong></p>
2829

2930
<ul>
30-
<li><code>0 &lt;= x &lt;= 2<sup>31</sup> - 1</code></li>
31+
<li><code>0 &lt;= x &lt;= 2<sup>31</sup> - 1</code></li>
3132
</ul>
3233

3334
## Solutions

0 commit comments

Comments
 (0)