0%

Problem 961


Problem 961


Removing Digits

This game starts with a positive integer. Two players take turns to remove a single digit from that integer. After the digit is removed any resulting leading zeros are removed.

For example, removing a digit from $105$ results in either $5$, $10$ or $15$.

The winner is the person who removes the last nonzero digit.

Define $W(N)$ to be how many positive integers less than $N$ for which the first player can guarantee a win given optimal play. You are given $W(100) = 18$ and $W(10^4) = 1656$.

Find $W(10^{18})$.


删除数字

两位玩家轮流从一个正整数中删除一个数字;每次删除之后产生的前导零也会一并被删除。

例如,从$105$中删除一个数字会得到$5$、$10$或$15$。

删除最后一个非零数字的玩家获胜。

定义$W(N)$为小于$N$且双方均采用最优策略时先手玩家必胜的正整数数量。已知$W(100) = 18$,$W(10^4) = 1656$。

求$W(10^{18})$。