The Cheaper Cab solution codechef

The Cheaper Cab solution codechef

  Chef has to travel to another place. For this, he can make use of any of the two taxi services. The first taxi service charges XX rupees. The second taxi service charges YY rupees. Chef wants to spend the minimum amount of money. Which taxi service should Chef take?

The Cheaper Cab solution codechef

  • The first line will contain TT – the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains two integers XX and YY – the prices of first and second cab services respectively.

 The Cheaper Cab solution codechef

For each test case, output FIRST if the first cab service is cheaper, output SECOND if the second cab service is cheaper, output ANY if both cab services have the same price.

You may print each character of FIRSTSECOND and ANY in uppercase or lowercase (for example, anyaNyAny will be considered identical).

Constraints

  • 1T1001≤T≤100
  • 1X,Y1001≤X,Y≤100

 The Cheaper Cab solution codechef

 
3
30 65
42 42
90 50

Sample Output 1 

FIRST
ANY
SECOND

Explanation

Test case 11: The first cab service is cheaper than the second cab service.

Test case 22: Both the cab services have the same price.

Test case 33: The second cab service is cheaper than the first cab service.

ANSWER

Click Here

Leave a Comment