You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solution/0000-0099/0069.Sqrt(x)/README_EN.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
9
9
<p>Since the return type is an integer, the decimal digits are <strong>truncated</strong>, and only <strong>the integer part</strong> of the result is returned.</p>
10
10
11
+
<p><strong>Note: </strong>You are not allowed to use any built-in exponent function or operator, such as <code>pow(x, 0.5)</code> or <code>x ** 0.5</code>.</p>
12
+
11
13
<p> </p>
12
14
<p><strong>Example 1:</strong></p>
13
15
@@ -18,16 +20,15 @@
18
20
19
21
<p><strong>Example 2:</strong></p>
20
22
21
-
<pre>
22
-
<strong>Input:</strong> x = 8
23
+
<pre><strong>Input:</strong> x = 8
23
24
<strong>Output:</strong> 2
24
25
<strong>Explanation:</strong> The square root of 8 is 2.82842..., and since the decimal part is truncated, 2 is returned.</pre>
25
26
26
27
<p> </p>
27
28
<p><strong>Constraints:</strong></p>
28
29
29
30
<ul>
30
-
<li><code>0 <= x <= 2<sup>31</sup> - 1</code></li>
31
+
<li><code>0 <= x <= 2<sup>31</sup> - 1</code></li>
0 commit comments