-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAUCTION.java
More file actions
33 lines (29 loc) · 936 Bytes
/
AUCTION.java
File metadata and controls
33 lines (29 loc) · 936 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
30
31
32
33
/* Problem
Alice, Bob and Charlie are bidding for an artifact at an auction.
Alice bids AA rupees, Bob bids BB rupees, and Charlie bids CC rupees (where AA, BB, and CC are distinct).
According to the rules of the auction, the person who bids the highest amount will win the auction.
Determine who will win the auction. */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a>b && a>c){
System.out.println("Alice");
}else if(b>a && b>c){
System.out.println("Bob");
}else{
System.out.println("Charlie");
}
}
}
}