[Solution] Car or Bus solution codechef

Car or Bus solution codechef – Chef wants to reach home as soon as possible. He has two options:

• Travel with his BIKE which takes XX minutes.
• Travel with his CAR which takes YY minutes.

Which of the two options is faster or do they both take same time?

Car or Bus solution codechef

• First line will contain TT, number of test cases. Then the test cases follow.
• Each test case contains a single line of input, two integers X,YX,Y representing the time taken to travel with BIKE and CAR respectively.

Output Format

For each test case, print CAR if travelling with Car is faster, BIKE if travelling with Bike is faster, SAME if they both take the same time.

You may print each character of CARBIKE and SAME in uppercase or lowercase (for example, CARCarcAr will be considered identical).

Constraints

• 1T1001≤T≤100
• 1X,Y101≤X,Y≤10

Car or Bus solution codechef

3
1 5
4 2
6 6


Sample Output 1

BIKE
CAR
SAME


Car or Bus solution codechef

Test case-1: Travelling with BIKE takes 11 minute while travelling with CAR takes 55 minutes. So travelling with BIKE is faster.

Test case-2: Travelling with BIKE takes 44 minutes while travelling with CAR takes 22 minutes. So travelling with CAR is faster.

Test case-3: Travelling with both BIKE and CAR takes the SAME time i.e. 66 minutes.