반갑습니다! 미주입니다:^)
이번에는 "10950번 A+B-3" 문제입니다!
정말 간단한 문제이므로 풀이 없이 바로 자바 코드를 올려드리겠습니다 하핳 :^)
[문제&입력&출력]
[자바 코드]
import java.io.*;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
int T;
int[] result;
String[] arrStr = new String[2];
T = Integer.valueOf(br.readLine());
result = new int[T];
for(int i = 0; i < T; i++) {
arrStr = br.readLine().split(" ");
result[i] = Integer.parseInt(arrStr[0]) + Integer.parseInt(arrStr[1]);
}
for(int j = 0; j < result.length; j++) {
bw.write(String.valueOf(result[j]));
bw.newLine();
}
bw.close();
}
}
알려드린 것이 도움되길 바라며 다들 자바 공부 열심히 하세요~!~! :^)
'BaekJoon' 카테고리의 다른 글
[백준 알고리즘] [15552번 빠른 A+B] 자바 코드 (0) | 2020.09.03 |
---|---|
[백준 알고리즘] [8393번 합] 자바 코드 (0) | 2020.09.03 |
[백준 알고리즘] [2739번 구구단] 자바 코드 (0) | 2020.08.31 |
[백준 알고리즘] [2884번 알람 시계] 풀이 & 자바 코드 (0) | 2020.08.31 |
[백준 알고리즘] [14681번 사분면 고르기] 자바 코드 (0) | 2020.08.31 |
댓글