-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHEFCONTEST.java
29 lines (28 loc) · 934 Bytes
/
CHEFCONTEST.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.util.*;
import java.io.*;
class CHEFCONTEST{
public static void main(String[] args) throws java.lang.Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int tc = Integer.parseInt(br.readLine());
while(tc-->0)
{
StringTokenizer st = new StringTokenizer(br.readLine());
int x = Integer.parseInt(st.nextToken());
int y = Integer.parseInt(st.nextToken());
int p = Integer.parseInt(st.nextToken());
int q = Integer.parseInt(st.nextToken());
if(x+(p*10)<y+(q*10))
{
System.out.println("Chef");
}
if(x+(p*10)>y+(q*10))
{
System.out.println("Chefina");
}
if(x+(p*10)==y+(q*10))
{
System.out.println("Draw");
}
}
}
}