Easy · Math

Add two big string numbers

Given two non-negative integers a and b as decimal digit strings (no leading zeros except "0" itself), return their sum as a decimal string without converting the whole strings to built-in integers.

Examples

Example 1

{
  "a": "456",
  "b": "77"
}

Output: 533

Example 2

{
  "a": "999",
  "b": "1"
}

Output: 1000

Rebuild it in the studio

Open every published interview problem, solution, scene, and memory room free, with no account.

More Math problems