The Cheaper Cab

Suman Barik
0

Problem

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

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

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

Constraints

  • 1 \leq T \leq 100
  • 1 \leq X, Y \leq 100
#include <bits/stdc++.h>
using namespace std;
 
void mainSolve()
{
  int f,s;
  cin >>f>>s;
 
  if(f<s)
    cout<<"FIRST"<<endl;
 
  else if(f>s)
    cout<<"SECOND"<<endl;
 
  else
    cout<<"ANY"<<endl;
 
}
 
int main()
{
  int t;
  cin >> t;
  while (t--)
  {
    mainSolve();
  }
  return 0;
}






Post a Comment

0Comments
Post a Comment (0)