My issue
My code
# cook your dish here
for T in range(int(input())):
x = int(input())
y = int(input())
a = int(input())
if x < a and y > a:
print("Yes")
else:
print("No")
Problem Link: AGELIMIT Problem - CodeChef
@sujayd07
You aren’t taking the inputs correctly. All inputs are being provided in a single line, so you should have either used a list or map function.
Also the condition is not correct. You can refer to the following code for a better understanding.
# cook your dish here
for _ in range(int(input())):
x,y,a=map(int,input().split())
if((a>=x)and(a<y)):
print('YES')
else:
print('NO')
Hello @sujayd07 !
Certain changes can be made in your code.
- Mapping can be used to take input.
- Chef’s age can be greater than or equal to the minimum age i.e. a>=x