 All Problems
Sum of Two Integers
medium
bit manipulation
math
amazon
facebook
google

Given two integers a and b, return the sum of the two integers without using the operators + and -.

Example 1:

Input:
1 2
Output: 3

Example 2:

Input:
2 3
Output: 5

Constraints:

  • -1000 ≤ a, b ≤ 1000

Input format: Two space-separated integers on one line.

Output format: Their sum.

Run to check your code against the sample cases, or submit to run every case