We will show that the second player can win regardless of the first player's actions. Obviously, none of the players will write 0 in any step.
Notice that 10r≡(−1)r(mod11), so the following criterion for divisibility by 11 holds:
akak+1…an≡an−an−1+an−2−⋯+(−1)n−kak(mod11)
Denote by Nk the remainder when dividing akak+1…an by 11, for k=1,…,n. If, after the nth move, the numbers N1,…,Nn are pairwise distinct, then by the mentioned criterion, in the next move we obtain the numbers an+1−N1,…,an+1−Nn,an+1(mod11) which are also pairwise distinct since an+1=0. Inductively, we conclude that after each step of the game (for n≤10), the numbers N1,…,Nn are distinct. Because of the way in which N1,…,Nn transform at each move, we conclude that there are at most n+1 digits which, if the player writes them, will cause him to lose.
Assume that the game lasts for at least nine moves. The second player loses if and only if, after the ninth move, the set {N1,N2,…,N9} is {1,2,…,9}, i.e. the second player wins if and only if 10 is among the numbers N1,N2,…,N9.
If, after the eighth move, {N1,...,N8} lacks two numbers between 1 and 10 which are not consecutive, then, no matter what the first player chooses in the ninth move, one of the numbers N1,...,N9 must be 10. Namely, if the first player chooses X, then there is k such that Nk=X+1 (in eighth move). Hence, after the ninth move we obtain
Nk≡X−(X+1)≡−1≡10(mod11).
Let us show that the second player can ensure that after the eighth move, among the numbers N1,...,N8 there are no two consecutive numbers. Certainly, the second player can ensure that the game lasts at least seven moves. Let
{N1,...,N7}={1,2,...,10}∖{X,Y,Z}.
If among the numbers X, Y and Z there are no consecutive ones, then the second player can choose any of them. If Y=X+1, then the second player can write one of the numbers X or X+1 so that, after the eighth move, there are two consecutive numbers missing from N1,...,N8. Namely, if Z=X−1, the second player writes X, and if Z=X−1, the second player writes X+1.