PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: Kanhaiya Mohan
Tester: Takuki Kurokawa
Editorialist: Nishank Suresh
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Chef’s dog binary hears frequencies starting from 67 Hertz to 45000 Hertz (both inclusive).
If Chef’s commands have a frequency of X Hertz, find whether binary can hear them or not.
EXPLANATION:
This is a direct application of if
conditions: print “Yes” if X \geq 67 and X \leq 45000, and “No” otherwise.
TIME COMPLEXITY
\mathcal{O}(1) per test case.
CODE:
Editorialist's code (Python)
for _ in range(int(input())):
print('yes' if 67 <= int(input()) <= 45000 else 'no')