Baekjoon Algorithm | Problem 10950: A+B - 3
Source
https://www.acmicpc.net/problem/10950
Problem
Solve Baekjoon Online Judge problem 10950, A+B - 3.
Input
Follow the input format and constraints given in the original problem statement.
Output
Print the answer required by the problem.
Sample Input 1
5 1 1 2 3 3 4 9 8 5 2
Sample Output 1
2 5 7 17 7
Algorithm Classification
- Math
- Implementation
- Arithmetic
Solution
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int input = sc.nextInt();
for (int i = 0; i < input; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a + b);
}
}
}