[BOJ] JAVA - A + B -3

정상희·2022년 9월 30일

BOJ

목록 보기
4/4

boj.kr/10950

코드

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int[] testcase = new int[num];
		
		for(int i=0; i<testcase.length; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			testcase[i] = a + b;
		}
		for(int k : testcase) {
			System.out.println(k);
		}
		sc.close();
	}
}

출력

profile
기록중

0개의 댓글