Number Game - ZCO 2011 P2

Hi, can anybody please help me to solve the problem ZCO 2011 P2.
Link here: https://www.iarcs.org.in/inoi/2011/zco2011/zco2011-1b.php

Someone pleaseee helppp…

Please

Thanks

1 Like

This may help you : https://www.geeksforgeeks.org/optimal-strategy-for-a-game-dp-31/