본문 바로가기
코딩테스트/백준

Java - 백준 코딩테스트 10950번 [for문 - A + B - 3]

by sycareer 2021. 6. 24.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import java.util.Scanner;
 
public class AplusB {
 
    public static void main(String[] args) {
        //20210614 - 10950번
        Scanner sc = new Scanner(System.in);
        
        int times = sc.nextInt();
        
        for (int i = 0; i < times; i++) {
            int num1 = sc.nextInt();
            int num2 = sc.nextInt();
            System.out.println(num1 + num2);
        }
    }
}
cs