Class Solution
java.lang.Object
g0301_0400.s0371_sum_of_two_integers.Solution
371 - Sum of Two Integers.<p>Medium</p>
<p>Given two integers <code>a</code> and <code>b</code>, return <em>the sum of the two integers without using the operators</em> <code>+</code> <em>and</em> <code>-</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> a = 1, b = 2</p>
<p><strong>Output:</strong> 3</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> a = 2, b = 3</p>
<p><strong>Output:</strong> 5</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>-1000 <= a, b <= 1000</code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
getSum
public int getSum(int a, int b)
-