Deep_Dev

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AWIX_iFqjg4DFAVH&categoryId=AWIX_iFqjg4DFAVH&categoryType=CODE&problemTitle=&orderBy=PASS_RATE&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=12 

 

SW Expert Academy

SW ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์—ญ๋Ÿ‰ ๊ฐ•ํ™”์— ๋„์›€์ด ๋˜๋Š” ๋‹ค์–‘ํ•œ ํ•™์Šต ์ปจํ…์ธ ๋ฅผ ํ™•์ธํ•˜์„ธ์š”!

swexpertacademy.com

 


์ˆ˜์˜ ๋ฒ”์œ„๊ฐ€ ์ž‘์•„์„œ ๊ทธ๋ƒฅ ์ตœ์†Œ๊ณต๋ฐฐ์ˆ˜๋ฅผ ๊ตฌํ•ด์„œ ๊ทธ๋Œ€๋กœ ์ž…์ถœ๋ ฅํ–ˆ๋Š”๋ฐ ..

์ด๊ฒŒ ์™œ ์ •๋‹ต๋ฅ  40ํ”„๋กœ์ง€ ..

 

 

import java.util.Scanner;
class Solution{
    public static void main(String args[]) throws Exception{
        Scanner kb = new Scanner(System.in);
        int T = kb.nextInt();
        for (int t = 1; t <= T; t++) {
            int a=kb.nextInt();
            int b=kb.nextInt();
            int c=kb.nextInt();
            int d=kb.nextInt();

            int temp=b*d;
            int A=temp/b;
            int B=temp/d;
            a*=A;
            c*=B;
            
            int max=Math.max(a,c);
            if(max==a&&max==c) System.out.println("#"+t+" "+"DRAW");
            else if(max==a) System.out.println("#"+t+" "+"ALICE");
            else System.out.println("#"+t+" "+"BOB");
        }
    }
}