-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRIGHT THERE
42 lines (35 loc) · 1.54 KB
/
RIGHT THERE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Input Format
The first line of input will contain a single integer T, denoting the number of test cases.
Each test case consists of two space-separated integers N and
X — the total number of people and the capacity of the party hall.
Output Format
For each test case, output on a new line, YES, if Chef can host the party and NO otherwise.
Each character of the output may be printed in either uppercase or lowercase. That is, the strings NO, no, nO, and No will be treated as equivalent.
Explanation:
Test case 1: Chef wants to host a party with 2 people. Since the capacity of the hall is 5, he can host the party.
Test case 2: Chef wants to host a party with 4 people. Since the capacity of the hall is 3, he can not host the party.
Test case 3: Chef wants to host a party with 6 people. Since the capacity of the hall is 6, he can host the party.
Test case 4: Chef wants to host a party with 10 people. Since the capacity of the hall is 9, he can not host the party.
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
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 N=sc.nextInt(); //no of people
int X=sc.nextInt(); //hall capacity
if(N<=X){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}// your code goes here
}
}