728x90
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
int[] output = new int[t];
for(int i = 0; i < t ; i++) {
int a = scanner.nextInt();
int b = scanner.nextInt();
if((a>0&&a<10) && (b>0&&b<10)) {
output[i] = a+b;
}
}
scanner.close();
for(int i = 0; i<t ; i++) {
System.out.println(output[i]);
}
}
}
728x90
'PS > BaekJoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
2751 JAVA ์ ์ ๋ ฌํ๊ธฐ 2 (0) | 2022.07.03 |
---|---|
2675 JAVA ๋ฌธ์์ด ๋ฐ๋ณต (0) | 2022.06.30 |
3052 JAVA ๋๋จธ์ง (0) | 2022.06.30 |
2439 JAVA ๋ณ์ฐ๊ธฐ -2 (0) | 2022.06.22 |
10699 JAVA ์ค๋ ๋ ์ง (0) | 2022.06.20 |