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

更新国内版力扣题目描述变更

This commit is contained in:
2022-05-02 23:42:43 +08:00
parent 74598d1cf8
commit 7ea03594b3
198 changed files with 11378 additions and 11118 deletions

View File

@@ -1,26 +1,26 @@
<p>Write methods to implement the multiply, subtract, and divide operations for integers. The results of all of these are integers. Use only the add operator.</p>
<p>You should implement following methods:</p>
<ul>
<li><code>Operations()</code>&nbsp; constructor</li>
<li><code>minus(a, b)</code>&nbsp; Subtraction, returns&nbsp;<code>a - b</code></li>
<li><code>multiply(a, b)</code>&nbsp; Multiplication, returns&nbsp;<code>a * b</code></li>
<li><code>divide(a, b)</code>&nbsp; Division, returns&nbsp;<code>a / b</code></li>
</ul>
<p><strong>Example: </strong></p>
<pre>
Operations operations = new Operations();
operations.minus(1, 2); //returns -1
operations.multiply(3, 4); //returns 12
operations.divide(5, -2); //returns -2
</pre>
<p><strong>Note: </strong></p>
<ul>
<li>You can assume inputs are always valid, that is, e.g., denominator will not be 0 in division.</li>
<li>The number of calls will not exceed 1000.</li>
</ul>
<p>Write methods to implement the multiply, subtract, and divide operations for integers. The results of all of these are integers. Use only the add operator.</p>
<p>You should implement following methods:</p>
<ul>
<li><code>Operations()</code>&nbsp; constructor</li>
<li><code>minus(a, b)</code>&nbsp; Subtraction, returns&nbsp;<code>a - b</code></li>
<li><code>multiply(a, b)</code>&nbsp; Multiplication, returns&nbsp;<code>a * b</code></li>
<li><code>divide(a, b)</code>&nbsp; Division, returns&nbsp;<code>a / b</code></li>
</ul>
<p><strong>Example: </strong></p>