PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: kg_26, shanmukh29
Tester: raysh07
Editorialist: iceknight1093
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Chef is 130 cm tall and weighs 60 kg,
To enter a water park, he must be at least H cm tall and weight at most W kg. Can he enter?
EXPLANATION:
The answer is Yes
if 130\geq H and 60\leq W, and No
otherwise.
Check both conditions using if
statements.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (Python)
w, h = map(int, input().split())
print('Yes' if w >= 60 and h <= 130 else 'No')