BETA

Difficulty Level:

Basic

Total Submissions: 2816 Accuracy:

9.69%

Sum of two large numbers
     

Given two non-negative numbers X and Y. The task is calculate the sum of X and Y.

Input:

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains two numbers X and Y.

Output:
For each test case, if the number of digits in sum (X+Y) are equal to the number of digits in X, then print sum, else print X.

Constraints:
1<=T<=500
1<=|Number length |<=100

Example:
Input:
2

25 23
3 5

Output:
48
8

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun Tyagi

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.