← All problemsSign in

Chef Candies

The chef initially has **X** number of candies and **Y** number of chocolates. At any instant, the chef can go to the three shops - **shop1**, **shop2**, and **shop3**. The chef can also sell candies and chocolates to the shopkeeper of a shop. After every unit time, the chef has to change the shop where he is buying candies and chocolates. for example, If the chef is at shop1, then in next secon

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start