I don’t understand what makes a winning starting move…I can always find a path to a win based on the starting number and subsequent moves therefore I must not understand something. For instance in test case 2, N = 9 and the winning numbers are 1,7,8,9.
However if I pick 2, N = 7 and player two has options 1, 3, 4, 5 or 6.
–if he picks 6 I lose because N = 1 and my options are 2,3,5,8,9 all would make N negative
–if he picks 5 I win because N = 2 and my only non negative options are 1 or 2 which make him lose
–if he picks 4 I lose
–if he picks 3 I lose
–if he picks 1 we go another round with N =6 and my options are 2, 3, 5 (8,9) are losers
----I pick 5 I lose because N = 1 and he picks 1
----I pick 3 I win
----I pick 2 we go another round with 2 more outcomes 1 win each.
Based on the above I would conclude that 2 is a winner when starting at 9 can someone explain what I am missing?