반응형
문제 이해
아이디어
코드
import java.util.Scanner;
import java.io.FileInputStream;
class Solution
{
public static void main(String args[]) throws Exception
{
Scanner sc = new Scanner(System.in);
String[] str = sc.nextLine().split(" ");
int a = Integer.parseInt(str[0]);
int b = Integer.parseInt(str[1]);
sc.close();
String output = (a+1)%3 > (b+1)%3 ? "A":"B";
System.out.println(output);
}
}
집사는개발자가되고파
choppadontbiteme.tistory.com
반응형
'Algorithm > SWEA' 카테고리의 다른 글
[SWEA] 1938. 아주 간단한 계산기 D1 JAVA (0) | 2021.03.16 |
---|---|
[SWEA] 1933. 간단한 N 의 약수 D1 JAVA (0) | 2021.03.16 |
[SWEA] 2019. 더블더블 D1 JAVA (0) | 2021.03.16 |
[SWEA] 1545. 거꾸로 출력해보아요 D1 JAVA (0) | 2021.03.16 |
[SWEA] 5642. 합 D3 JAVA (0) | 2021.03.07 |