File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ import java .io .*;
2+ import java .util .*;
3+
4+ class Solution
5+ {
6+ public static void main (String args []) throws Exception
7+ {
8+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
9+ StringTokenizer st = new StringTokenizer (br .readLine ());
10+ int A = Integer .parseInt (st .nextToken ());
11+ int B = Integer .parseInt (st .nextToken ());
12+
13+ Map <Integer ,String > map = new HashMap <>();
14+ map .put (A , "A" );
15+ map .put (B , "B" );
16+
17+ int diff = Math .abs (A -B );
18+
19+ if (diff == 2 ) {
20+ int result = (A >B )? B :A ;
21+ System .out .println (map .get (result ));
22+ }
23+ else {
24+ int result = (A >B )? A :B ;
25+ System .out .println (map .get (result ));
26+ }
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ # [ D1] 1대1 가위바위보 - 1936
2+
3+ [ 문제 링크] ( https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PjKXKALcDFAUq )
4+
5+ ### 성능 요약
6+
7+ 메모리: 25,728 KB, 시간: 75 ms, 코드길이: 752 Bytes
8+
9+ ### 제출 일자
10+
11+ 2025-09-24 17:26
12+
13+
14+
15+ > 출처: SW Expert Academy, https://swexpertacademy.com/main/code/problem/problemList.do
You can’t perform that action at this time.
0 commit comments