Hey I was doing the same problem for code ninjas. I didn’t get the answer for this and wasn’t able to do it. Kind of a hint I could give but that is all I have.
You see in game theory we have two states for game. Winning State and Non-Winning state. You can find that all Non-Winning states are 1,3,7,15 and so forth, which follows the patter of 2^n-1. where 1<=n<=64. That are all the non-winning states. So if A comes on a Non-Winning state. There exists no number with which n&x==0.