← Complete problem index

PROJECT EULER · #0961

Removing Digits

Statement only · SolvedOriginal problem ↗

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(104)=1656.

Find W(1018).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.