Skip to content
Onsite

Sum of Two Integers

MediumP3Coding

Return the sum of two integers a and b without using the operators + and -.

Example 1

Input
a = 1, b = 2
Output
3

Example 2

Input
a = 2, b = 3
Output
5

Example 3

Input
a = -1, b = 1
Output
0

Constraints

  • -1000 <= a, b <= 1000

Hints

Run checks the 3 visible tests, Submit all 10.