← All problemsSign in

Chef and Ice Cream

Chef has invited Alex and you to visit his ice cream factory. While exploring the factory Alex saw an endless row of boxes, he asked Chef about it. Chef explained that these boxes are filled with Ice Creams and they can take a box with them if they can count and tell how many Ice Creams are there in N th box. But there is a twist you both can only open one box to see how many Ice Creams are there

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