[Solution] Test Score CodeChef Solution | Solution CodeChef
Problem
In a test, there are problems, each carrying marks.
In each problem, Chef either received marks or marks.
Determine whether is it possible for Chef to achieve exactly marks.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of three integers and , the number of problems, the maximum score for each problem, and the score Chef wants.
Output Format
For each test case, output YES
if Chef can achieve exactly marks, NO
otherwise.
You can print each character of the string in uppercase or lowercase. For example, the strings Yes
, YES
, yes
, and yEs
, are all considered identical.
Explanation:
Test case : There is no way for Chef to score exactly marks.
Test case : Chef can score marks by receiving marks in problems and marks in problem.
Test case : Chef can score marks by receiving marks in each of the problems.
Test case : Chef can score marks by receiving marks in each of the problems.
Test case : There is no way for Chef to score exactly marks.
No comments:
Post a Comment