#148. sumLimit
sumLimit
Background
Description
Given 2 non-negative ints, a and b, return their sum, so long as the sum has the same number of digits as a. If the sum has more digits than a, just return a without b. (Note: one way to compute the number of digits of a non-negative int n is to convert it to a string with String.valueOf(n) and then check the length of the string.)
Format
Input
Output
Samples
2 3
5
8 3
8
8 1
9
Limitation
1s, 1024KiB for each test case.