PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: jeevanjyot
Testers: mexomerf, rivalq
Editorialist: iceknight1093
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Chef has Y multivitamin tablets, and needs to take 3 of them each day for the next X days.
Does Chef have enough tablets in stock?
EXPLANATION:
Chef needs 3 tablets a day for X days, making a total of 3X tablets.
So, the answer is Yes
if 3X \leq Y and No
otherwise; which can be checked using an if
condition.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Code (Python)
for _ in range(int(input())):
x, y = map(int, input().split())
print('Yes' if y >= 3*x else 'No')