The odd number of the asterisks are written on the blackboard: .
Ann and Bob play the following game. They, in turn (Ann starts), replace one of the asterisks in the expression by any of the digits from to (the first left asterisk cannot be replaced by ). Ann wins if the obtained number is divisible by , otherwise Bob wins.
Who of the players wins if both of them play to win?
Solution
Answer: Bob wins.
It is well-known that a natural number is divisible by if and only if , where , are the sums of the digits on the odd and even positions respectively in the decimal representation of .
Let () asterisks be written on the blackboard: .
Show Bob's winning strategy. If Ann replaces some asterisk (different from the first one) by , then, in answer, Bob replaces asterisk of the opposite parity by the same digit (note that Bob always chooses the asterisk different from the first one). Thus, if at the end Ann replaces the first asterisk by some digit , then . Since we see that the obtained number is not divisible by .
If Ann replaces the first asterisk by some digit and it is not her last move, then Bob replaces some even asterisk by , and further he keeps the strategy described above. As the result in the end Ann must replace some odd asterisk by some digit . Therefore, in this case . Since is a digit we have , so the obtained number is not divisible by , and Bob wins.