728x90
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com

import java.util.Scanner;
class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 1; tc <= t; tc++) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int alice =a*d; //통분해서 값을 맞춰줬다.
int bob = b*c;
String result="DRAW";
if(alice>bob) {
result="ALICE";
}
else if(alice<bob) {
result="BOB";
}
System.out.println("#"+tc+" "+result);
}
}
}
728x90
'SW Expert Academy > SWEA D3' 카테고리의 다른 글
| [SW Expert Academy] 최고의 쌍 (D3) (0) | 2024.10.06 |
|---|---|
| [SW Expert Academy] 카드 게임 (D3) (0) | 2024.10.05 |
| [SW Expert Academy] 새샘이와 세 소수 (D3) (0) | 2024.10.05 |
| [SW Expert Academy] 유효숫자 표기 (D3) (0) | 2024.10.05 |
| [SW Expert Academy] 계산기 (D3) (0) | 2024.10.05 |