B3 Teams $A$ and $B$ are playing soccer until someone scores 29 goals. Throughout the game the score is shown on a board displaying two numbers - the number of goals scored by $A$ and the number of goals scored by $B$. A mathematical soccer fan noticed that several times throughout the game, the sum of all the digits displayed on the board was 10. (For example, a score of $12: 7$ is one such possible occasion). What is the maximum number of times throughout the game that this could happen?
Solution 1
When the sum of all the digits on the scoreboard is 10 , the sum of the scores must be 1 more than a multiple of 9 . The highest possible sum of the scores is $29+28=57$. The numbers less than 57 that are 1 more than a multiple of 9 are $1,10,19,28,37,46$, and 55 . If the sum of the scores is 1 , then the sum of the digits is 1 , not 10 . If the sum of the scores is 55 , then the scores are 26 and 29 or 27 and 28 , both of which have a digit sum of 19 . Thus, we cannot have this happen more than 5 times.
We see that the scores $(5,5),(5,14),(14,14),(23,14),(23,23)$ each have a digit sum of 10 , and can all be acheived in the same game. Thus, the maximum number of times is 5 .
Solution 2
Denote by $\left(a_{1} a_{2}, b_{1} b_{2}\right)$ the score displayed on the board where $a_{1}, a_{2}, b_{1}, b_{2}$ are digits (we allow $a_{1}$ and $b_{1}$ to be 0 ), and $a_{1} a_{2}, b_{1} b_{2}$ are the numbers of goals scored by the two teams. We will call a score good if $a_{1}+a_{2}+b_{1}+b_{2}=10$.
Lemma: Suppose scores $(x, y)$ and $(z, t)$ occurred throughout the game. Then at most one of $x>z$ and $yz$. Then the first team scored $x$ goals after it scored $z$ goals, so the score $(x, y)$ occurred later in the game than the score $(z, t)$. Therefore $y \geq t$, and the result follows.

We now show that we cannot have two good scores occurring throughout the game of the form $\left(a_{1} a_{2}, a_{1} b_{2}\right)$ and $\left(a_{1} a_{2}^{\prime}, a_{1} b_{2}^{\prime}\right)$. Suppose the scores did occur; then $a_{2}+b_{2}=a_{2}^{\prime}+b_{2}^{\prime}$. WLOG $a_{2}>a_{2}^{\prime}$. Then $b_{2}a_{1} a_{2}^{\prime} ; a_{1} b_{2}b_{1}$, then at most one of the good scores $\left(a_{1} a_{2}, b_{1} b_{2}\right),\left(b_{1} a_{2}^{\prime}, a_{1} b_{2}^{\prime}\right)$ could occur throughout the game. This follows immediately from the Lemma since $a_{1} a_{2}>$ $b_{1} a_{2}^{\prime} ; a_{1} b_{2}^{\prime}>b_{1} b_{2}$.
Since the game ends when someone scores 29 goals, the tens digit for each team is 0,1 , or 2. By the first claim have at most nine possibilities for the good scores: $(0 a, 0 b),(0 a, 1 b)$, $(0 a, 2 b),(1 a, 0 b),(1 a, 1 b),(1 a, 2 b),(2 a, 0 b),(2 a, 1 b),(2 a, 2 b)$ for some digits $a, b$ (possibly different for each case). By the second claim, at most one of $(0 a, 1 b)$ and $(1 a, 0 b) ;(0 a, 2 b)$ and $(2 a, 0 b) ;(1 a, 2 b)$ and $(2 a, 1 b)$ can occur, eliminating three possibilities. Furthermore, if $(0 a, 2 b)$ or $(2 a, 0 b)$ occurred then $(1 a, 1 b)$ could not occur and vice versa (since if WLOG $(0 a, 2 b)$ occurred, then the second team had at least 20 points by the time the first team got to 10 points). This eliminates one more possibility.

Hence at most $9-3-1=5$ good scores occurred. It remains to give an example when this occurrence is indeed possible. One such example is $(3,7),(8,11),(14,14),(16,21),(23,23)$.