Treasure Hunt
CodeChefOpen on judge ↗
Panto has recently discovered a treasure near her house. Everyday a finite number of gold coins appear in the treasure and Panto has the capability of taking all of them. If by chance, Panto is unable to collect the coins of that day, then the coins disappear. Panto is staying at the location for N days. After that, she has to go to next place and start expedition. Now, in this time of N days she
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