In a coding contest, there are two types of problems:
- Easy problems, which are worth point each
- Hard problems, which are worth points each
To qualify for the next round, a contestant must score at least points. Chef solved Easy problems and Hard problems. Will Chef qualify or not?
Input Format
- The first line of input contains a single integer , denoting the number of test cases. The description of test cases follows.
- Each test case consists of a single line of input containing three space-separated integers — , and .
Output Format
For each test case, output a new line containing the answer — Qualify
if Chef qualifies for the next round, and NotQualify
otherwise.
Each character of the answer may be printed in either uppercase or lowercase. For example, if the answer is Qualify
, outputs such as qualify
, quALiFy
, QUALIFY
and QuAlIfY
will also be accepted as correct.
Constraints
Sample Input 1
3
15 9 3
5 3 0
6 2 8
Sample Output 1
Qualify
NotQualify
Qualify
Explanation
Test Case : Chef solved easy problems and hard problems, making his total score . He needs at least points to qualify, which he has and hence he qualifies.
Test Case : Chef solved easy problems and hard problems, making his total score . He needs at least points to qualify, which he doesn't have and hence doesn't qualify.
Test Case : Chef solved easy problems and hard problems, making his total score . He needs at least points to qualify, which he has and hence he qualifies.
No comments:
Post a Comment