Solvarch
DSA ProblemsProgressPlanRoadmapsReviewCheat SheetsCompaniesSystem DesignCS FundamentalsQuestion Bank
Theme
Problems

Sum of Two Integers

Medium
bit-manipulationmath

Compute a + b without using + or -.

Input: one line, two integers a b. Output: their sum.

Example 1
Input:
1 2
Output:
3
Example 2
Input:
2 3
Output:
5

Constraints

  • -1000 ≤ a, b ≤ 1000
Watch a video walkthrough

Run your code against the sample tests, or Submit to run the full suite.