Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Chef and his girlfriend go on a date. Chef took X dollars with him, and was quite sure that this would be enough to pay the bill. At the end, the waiter brought a bill of Y dollars. Print "YES"
if Chef has enough money to pay the bill, or "NO"
if he has to borrow from his girlfriend and leave a bad impression on her.
For each test case, output on a new line "YES"
if Chef has enough money to pay the bill and "NO"
otherwise.
You may print each character of the string in either uppercase or lowercase (for example, the strings "yEs"
, "yes"
, "Yes"
and "YES"
will all be treated as identical).
Input: 4
1 1
1 2
2 1
50 100
Output: YES
NO
YES
NO
Test case 1: Since the money Chef has is equal to the bill, he will be able to pay the bill.
Test case 2: Since the money Chef has is less than the bill, he will have to borrow from his girlfriend and leave a bad impression on her.
Test case 3: Since the money Chef has is greater than the bill, he will be able to pay the bill.
Test case 4: Since the money Chef has is less than the bill, he will have to borrow from his girlfriend and leave a bad impression on her.
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll t;
cin>>t;
while(t--)
{
ll x,y;
cin>>x>>y;
if(x>=y)
{
cout<<"yes"<<"\n";
}
else
{
if(x<y)
{
cout<<"no"<<"\n";
}
}
}
return 0;
}
n=int(input())
for i in range(n):
l=list(map(int,input().split()))
if l[0]>=l[1]:
print('YES')
else:
print('NO')
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int i=0;i<T;i++){
int a = sc.nextInt();
int b = sc.nextInt();
if(a>=b){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}
In our experience, we suggest you solve this Chef On Date CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the Chef On Date CodeChef Solution
I hope this Chef On Date CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>