Chef Teaches His Kid
CodeChefOpen on judge ↗
Yesterday, Chef's Wife taught her Kid to count from 1 to N. Today, Chef wants to test if their Kid can really count from 1 to N. To lure his kid, Chef has told that for every right count his kid will get a candy and for every miss, the kid will lose a candy from candies which he has received. Tell us if kid will get some candies or not. Only if everything goes wrong and Kid couldn't get a candy, C
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