Codechef•Jul 21, 2025
Reach on Time
Hazrat Ali
Codechef
Chef left for the office X minutes before Chef was supposed to reach. Determine whether or not Chef will be able to reach on time.
Input Format
- The first line of input will contain a single integer TT, denoting the number of test cases.
- Each test case consists of a single integer X.
Output Format
For each test case, output YES
if Chef will reach on time, NO
otherwise.
The output is case-insensitive. Thus, the strings YES
, yes
, yeS
, and Yes
are all considered the same.
Constraints
- 1≤T≤60
- 1≤X≤60
Sample 1:
Input
6 30 60 14 29 31 42
Output
YES YES NO NO YES YES
Solution
n = int(input())
for _ in range(n):
a = int(input())
if a >= 30:
print("YES")
else:
print("NO")