풀이 흐름 설명
시간복잡도:
O(1), 공간복잡도:O(1)
- [ x ] 1회
- 2회
- 3회
import java.util.Scanner;
import java.io.FileInputStream;
class Solution
{
public static void main(String args[]) throws Exception
{
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if(A==1){
if(B==2){
System.out.print("B");
}else{
System.out.print("A");
}
}else if(A==2){
if(B==1){
System.out.print("A");
}else{
System.out.print("B");
}
}else{
if(B==1){
System.out.print("B");
}else{
System.out.print("A");
}
}
}
}
