Two players are playing the following game. They start with number 2013. Then they take turns subtracting from the number any of its non-zero digits. Example: 2013 → 2011 → 2009 → . . . However, 2013 → 2007 is not a legal move, because there is no 6 in 2013. The player who writes down 0 wins. Which player wins if they both play optimally and what is their strategy?
I've never had a grasp for strategy on these math games, and am looking for an answer as well as a way I can find the winning strategy quickly.
The losing numbers are precisely the multiples of $10$ (so $2013$ is a winning number). That is to say, player $1$ always wins (assuming optimal play) unless the starting number is a multiple of $10$.
To see this, consider the following strategy: if you are handed a number which is not a multiple of $10$, subtract the constant term and give your opponent a multiple of $10$. It is clear that your opponent can never win (as subtracting a single digit can never yield $0$).