-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path_10952.java
More file actions
33 lines (24 loc) · 793 Bytes
/
_10952.java
File metadata and controls
33 lines (24 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package backjoon;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
// A+B - 5
public class _10952 {
public static void main(String[] args) throws Exception {
// sol. memory 11592 kb runtime 84 ms
// BufferedReader 객체 생성 (Exception이 처리를 따로 해줘야 함)
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// StringTokenizer 객체 선언
StringTokenizer st;
while (true) {
st = new StringTokenizer(br.readLine(), " "); //한 줄씩
//String to int로 형변환
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
if (a == 0 && b == 0) {
break;
}
System.out.println(a+b);
}
}
}