SWEA_1936) 1대1 가위바위보
SWEA
# D1
1963) 1대1 가위바위보 (19.09.30)
문제 링크 (SW Expert Academy)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import java.util.*;
import java.io.*;
class Solution{
public static void main(String args[]) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer tk = new StringTokenizer(br.readLine());
int a = Integer.parseInt(tk.nextToken());
int b = Integer.parseInt(tk.nextToken());
if(a<b) {
if(a==1 && b==3) bw.write("A");
else bw.write("B");
}
else{
if(a==3 && b==1) bw.write("B");
else bw.write("A");
}
bw.flush();
bw.close();
}
}
| cs |
댓글
댓글 쓰기