Chef and Bird farm CodeChef Solution | CodeChef Problem Solution 2022
In Chefland, each chicken has legs and each duck has legs. Chef's farm can have exactly one type of bird.
Given that the birds on the farm have a total of legs:
- Print
CHICKEN
, if the farm can have only chickens but not ducks. - Print
DUCK
, if the farm can have only ducks but not chickens. - Print
ANY
, if the farm can have either chickens or ducks. - Print
NONE
, if the farm can have neither chickens nor ducks.
Input Format
- The first line will contain , the number of test cases. Then the test cases follow.
- Each test case consists of a single line of input, containing three space-separated integers .
Output Format
For each test case, output in a single line the type of bird on the farm.
- Print
CHICKEN
, if the farm can have only chickens but not ducks. - Print
DUCK
, if the farm can have only ducks but not chickens. - Print
ANY
, if the farm can have either chickens or ducks. - Print
NONE
, if the farm can have neither chickens nor ducks.
You may print each character of the string in uppercase or lowercase (for example, the strings , , and will all be treated as identical).
Constraints
Sample Input 1
3
2 3 5
2 2 2
3 4 6
Sample Output 1
NONE
ANY
CHICKEN
Explanation
Test case : There are legs on the farm. Each chicken has legs and each duck has legs. Thus, the farm can have neither chickens nor ducks.
Chef and Chapters CodeChef Solution | CodeChef Problem Solution 2022
Presents for Cheffina CodeChef Solution | CodeChef Problem Solution 2022
Chef and Bird farm CodeChef Solution | CodeChef Problem Solution 2022
Valentine Vex CodeChef Solution | CodeChef Problem Solution 2022
Buying Sweets CodeChef Solution | CodeChef Problem Solution 2022
Reduce to 1 CodeChef Solution | CodeChef Problem Solution 2022
Three Arrays CodeChef Solution | CodeChef Problem Solution 2022
Test case : There are legs on the farm. Each chicken has legs and each duck has legs. Thus, the farm can have any bird among chicken and duck.
Test case : There are legs on the farm. Each chicken has legs and each duck has legs. Thus, the farm can have chicken only.
Join Now for Solution:-
No comments:
Post a Comment