[Coding] The Cheaper Cab solution codechef

[Coding] The Cheaper Cab solution codechef

 

Chef has to travel to another place. For this, he can avail any one of two cab services.

  • The first cab service charges XX rupees.
  • The second cab service charges YY rupees.

Chef wants to spend the minimum amount of money. Which cab service should Chef take?

[Coding] 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.

[Coding] 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

[Coding] 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.

Leave a Comment