Add Two Numbers

Practice this coding question on Coding Gurukul.

Problem statement

Two donation desks record their collections separately during a campus event. At the end of each reporting period, a coordinator receives the two totals and needs their combined amount. Several reporting periods are bundled into one input file. You are building the small batch-processing tool that produces one combined total for every pair of desk reports. Your task For each test case, read two nonnegative integers a and b and print their sum. Each test case is independent: do not carry money from one reporting period into the next. Preserve the order of the test cases in the output. Important details The first integer in the file is the number of test cases, not an amount to add. A desk may report zero. Use a type that can hold the sum of two maximum permitted inputs. Worked example If the two reports are 12 and 35, their combined collection is 47. A second pair of 0 and 9 independently produces 9.

Input format

First line: T. Next T lines: a b.

Output format

Print one sum per test case on its own line.

Constraints

1 <= T <= 1000; 0 <= a,b <= 1000000000.

Sample input

2
12 35
0 9

Sample output

47
9

Sign in to run or submit a solution in C++, Java or Python.