Algorithms
[백준 알고리즘](I/O) 10950번 Java 풀이
SDev
2020. 3. 3. 20:13
728x90
입출력 - 2557, 1000, 2558, 10950, 10951, 10952, 10953, 11021, 11022, 11718, 11719, 11720, 11721, 2741, 2742, 2739, 1924, 8393, 10818, 2438, 2439, 2440, 2441, 2442, 2445, 2522, 2446, 10991, 10992
출처: https://plzrun.tistory.com/entry/알고리즘-문제풀이PS-시작하기 [plzrun's algorithm]
change Nxxxx -> Main && remove package lines!!!
이클립스에서 작성하면서 문제 이름으로 클래스를 생성하여 풀었기 때문에
클래스 이름을 Main으로 바꾸고, package 부분도 지우고 제출해야 정상적으로 돌아갑니다.
<풀이>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package io;
public class N10950 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i=0; i<t; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a+b);
}
}
}
|
Github: https://github.com/jaeuk9407/AlgorithmBOJ
jaeuk9407/AlgorithmBOJ
BaekJoon Online Judge Problems. Contribute to jaeuk9407/AlgorithmBOJ development by creating an account on GitHub.
github.com