Solution

Race to 100

Show the problem again

Two players start at 0 and alternately add any integer from 1 to 10 to a running total. Whoever brings the total to exactly 100 wins. The first player wins with optimal play. What number should the first player bring the total to on the first move?

Worked solution

The answer is 1. The winning positions are totals from which you can guarantee reaching 100: working backwards, these are 89, 78, ..., i.e., numbers congruent to 100 mod 11, which is 1. Since 1 is reachable on the first move, Player 1 claims it and can always respond to the opponent's k with 11 − k, marching up the ladder: 12, 23, 34, ..., 89, 100.

Source: Classic subtraction game, a standard entry point to Nim-style analysis. Statement written for AxiomIQ.