Wednesday, April 6, 2022

The Cheaper Cab

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

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

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

    Input Format

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

    Output Format

    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 FIRST, SECOND and ANY in uppercase or lowercase (for example, any, aNy, Any will be considered identical).

    Constraints

    Sample Input 1

    3
    30 65
    42 42
    90 50
    

    Sample Output 1

    FIRST
    ANY
    SECOND
    

    Explanation

    Test case

    : The first cab service is cheaper than the second cab service.

    Test case

    : Both the cab services have the same price.

    Test case

    : The second cab service is cheaper than the first cab service.

    No comments:

    Post a Comment

    मुझे दिल में बसाना आसान नहीं....

    पता है Recently i realised की मुझे दिल में बसाना आसान नहीं है बात-बात पे चिढ़ जाती हूं मैं दिल लगा लूं एक बार तो फिर ज़िद पे अड़...