PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: raysh07
Tester: iceknight1093
Editorialist: iceknight1093
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Is it possible to score R runs within B balls, when you can score at most 6 runs per ball?
EXPLANATION:
At 6 runs per ball, we can score at most 6B runs in B balls.
So,
- If 6B \lt R there’s no way to reach R at all.
The answer isNo. - Otherwise it’s possible to score enough runs (just score 6 on every ball) and the answer is
Yes.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (PyPy3)
r, b = map(int, input().split())
print('Yes' if 6*b >= r else 'No')