PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: Jeevan Jyot Singh
Testers: Nishank Suresh, Satyam
Editorialist: Nishank Suresh
DIFFICULTY:
254
PREREQUISITES:
None
PROBLEM:
Chef must drink at least 2000 ml of water every day.
He drank X ml of water today. Was it enough?
EXPLANATION:
The answer is “Yes” if X \geq 2000, and “No” otherwise.
This can be checked using an if
condition.
TIME COMPLEXITY
\mathcal{O}(N) per test case.
CODE:
Editorialist's code (Python)
for _ in range(int(input())):
x = int(input())
print('Yes' if x >= 2000 else 'No')