Bob, Alice's classmate, is a little smarter. He knows how to add 1 to a number, but, when he is given any two numbers, he does not know how to add them. Write a program to help Bob add two numbers.
Input Format
The first line has the number of test cases .
The following lines each contain two numbers, and .
Sample Input
3
1 2
3 4
5 6
Output Format
The output should contain lines, each of which should contain a single number: .
Here is some source code for all 3 languages to help get you started. All the programs below parse the input, but they just print out for each test case.
Java (Don't use the package statement, and make sure the class name is the same as the problem name)
import java.util.Scanner;
public class PRI1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
// Loop through each test case
for (int i = 0; i < T; i++) {
int N = sc.nextInt();
int M = sc.nextInt();
System.out.println(-1);
}
}
}
Python 3
T = int(input())
# Loop through each test case
for i in range(T):
N, M = map(int, input().split())
print(-1)
C++
#include
using namespace std;
int main() {
int T;
cin >> T;
// Loop through each test case
for (int i = 0; i < T; i++) {
int N, M;
cin >> N >> M;
cout << -1 << endl;
}
return 0;
}