Hello coders, today we will be solving Add Two Numbers CodeChef Solution whose problem code is FLOW001.
Problem
Shivam is the youngest programmer in the world, he is just 12 years old. Shivam is learning programming and today he is writing his first program.
Program is very simple, given two integers A and B, write a program to add these two numbers.
Input
The first line contains an integer T, the total number of test cases. Then follow T lines, each line contains two Integers A and B.
Output
For each test case, add A and B and display it in a new line.
Constraints
- 1 <= T <= 1000
- 0 <= A, B <= 10000
Example
Input
3 1 2 100 200 10 40
Output
3 300 50
Solution - Add Two Numbers - CodeChef Solution
#Note that it's python3 Code. Here, we are using input() instead of raw_input(). #You can check on your local machine the version of python by typing "python --version" in the terminal. #Read the number of test cases. N = int(input()) while N > 0: x, y = map(int, input().split()) sum = x + y print(sum) N = N - 1
Disclaimer: The above Problem (Add Two Numbers) is generated by CodeChef but the Solution is provided by Sloth Coders.
Happy Coding !!
A Sloth Who loves to Code
Also Read: