Codechef•Jul 10, 2025
Masterchef finals
Hazrat Ali
Codechef
He is ranked X out of all contestants. However, only 10 contestants would be selected for the finals.
Check whether Chef made it to the top 10 or not?
Input Format
- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of one integers X — the current rank of Chef.
Output Format
For each test case, output on a new line, YES, if Chef made it to the top 10 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.
Constraints
- 1≤T≤100
- 1≤X≤100
Sample 1:
Input
4 15 10 1 50
Output
NO YES YES NO
Solution
t = int(input())
for _ in range(t):
x = int(input())
if x <= 10:
print("YES")
else:
print("NO")