Optimal Game Strategy-1 doubt

TestCase #3 is giving wrong answer
Can any one provide it’s solution

Hi Avin

Please send your code here. I’ll have a look.