The Treasure Hunt
CodeChefOpen on judge ↗
Once N number of friends set out on a treasure hunt of hidden gold coins on the sea shore of ByteLand .After a lot of hunting they finally got the treasure of gold .They do not know how many coins are there in the treasure box. They decided to divide it equally among themselves in the morning. At night, one friend woke up, divided the coins into N equal parts after throwing 1 coin into the sea as
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