ICE_CREAM - Editorial

PROBLEM LINK:

Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4

Author: yash_daga
Tester: raysh07
Editorialist: iceknight1093

DIFFICULTY:

TBD

PREREQUISITES:

None

PROBLEM:

Can you buy two ice creams, each costing X dollars, if you have Y dollars with you?

EXPLANATION:

One ice cream costs X dollars, meaning two of them will cost 2X dollars.
So, the answer is Yes if Y \geq 2X and No otherwise.

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (Python)
x, y = map(int, input().split())
print('Yes' if y >= 2*x else 'No')