← All problemsSign in

Chef and GemStones

Vinay and his friend Chef wants to get the gem stone to protect it from getting into evil hands. Arjuna(a very sleepy fellow) being the guard of the gem stone is very greedy and has a special bag, into which he can add one gold coin at a time or can remove the last gold coin he added. Arjuna will sleep, once he will have the enough number of gold coins worth amount X. To help Vinay, Chef has given

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