A. A+B (Trial Problem) Codeforces Solution Kotlin Heroes: Practice 7

A. A+B (Trial Problem) Codeforces Solution

You are given two integers a and b. Print a+b.

Input
The first line contains an integer t (1≤t≤104) — the number of test cases in the input. Then t test cases follow.

Each test case is given as a line of two integers a and b (−1000≤a,b≤1000).

Output
Print t integers — the required numbers a+b.

Example
input
4
1 5
314 15
-99 99
123 987

output
6
329
0
1110

Solution

Program C++: A+B (Trial Problem) Solution in C++

#include <stdio.h>
int main(){
	int t,a,b;
	scanf("%d",&t);
	while(t--){
		scanf("%d%d",&a,&b);
		printf("%d\n",a+b);
	}
	return 0;


Program Python: A+B (Trial Problem) Solution in Python

for _ in range(int(input())):
    a,b=map(int,input().split())
    print(a+b)

Codechef Long Challenge Solutions

June Long Challenge 2021 Solutions

March Long Challenge 2021 Solutions

April Long Challenge 2021 Solutions

February Long Challenge 2021

January Long Challenge 2021

November Challenge 2020 SOLUTION CodeChef

2 thoughts on “A. A+B (Trial Problem) Codeforces Solution Kotlin Heroes: Practice 7”

Leave a Comment

4 + fourteen =