-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBidding.java
More file actions
29 lines (27 loc) · 821 Bytes
/
Copy pathBidding.java
File metadata and controls
29 lines (27 loc) · 821 Bytes
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.Scanner;
public class Bidding {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
sc.nextLine();
for (int i = 0; i < t; i++) {
String str = sc.nextLine();
String[] xyz = str.split(" ");
int x = Integer.parseInt(xyz[0]);
int y = Integer.parseInt(xyz[1]);
int z = Integer.parseInt(xyz[2]);
//x for Charlie
// y for Bob
//z for Alice
if(x>y && x > z ){
System.out.println("Alice");
}
if(y>z && y > x ){
System.out.println("Bob");
}
if(z>x && z > y ){
System.out.println("Charlie");
}
}
}
}