Mandir Dhavanen sah Ex-ORah
CodeChefOpen on judge ↗
Bramhagupta, the legendary mathematician, had proposed a game in $640\ CE$. The game is described as follows: **Game Setup** - The game consists of a straight track containing $N$ cells. - There is a fence after every $L^{th}$ cell. *(Note: The fence is BETWEEN these cells and NOT ON the cells)* - Each cell has a coin of some denomination. **Gameplay** - The player starts running from any 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.
Sign in to chat with the tutor and save your progress.
Sign in to start