Chef and Bird farm
In Chefland, each chicken has $X$ legs and each duck has $Y$ legs. Chef's farm can have **exactly one type** of bird. Given that the birds on the farm have a total of $Z$ 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 f
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start