My issue
The code is showing incorrect but it is working absolutely fine on my local machine.
My code
# cook your dish here
T = int(input())
if T>=2000:
print("YES")
else:
print("NO")
Learning course: Practice Python
Problem Link: CodeChef: Practical coding for everyone
You haven’t taken the input for the test cases. You are directly taking the input for numbers
Using if else statement, If w is greater than equal to 2000 print YES else print NO
Hope you will find it useful.
n = int(input())
for _ in range(n):
t = int(input())
if t >= 2000:
print(“YES”)
else:
print(“NO”)
c++ code
include <bits/stdc++.h>
using namespace std;
int main()
{
int n;cin>>n;
while (n–){
int t ;cin>>t;
if (t>=2000)
cout << “YES”<<endl;
else
cout << “NO”<<endl;
}
}