Emílio likes to propose mathematical and animal challenges. He wrote on a piece of paper the following sum:

$$
\begin{array}{rcccc} 
& \mathbf{G} & \mathbf{A} \mathbf{O} \\
+ & \mathbf{P} & \mathbf{U} & \mathbf{A} \\
\hline \mathbf{P} & \mathbf{U} & \mathbf{M} & \mathbf{S}
\end{array}
$$

Emílio said that the sum above represents a correct sum of two numbers, where each letter represents a distinct digit.

a) What is the digit represented by the letter $\mathbf{P}$?

b) What are the digits represented by the letters $\mathbf{G}$ and $\mathbf{U}$?

c) What is the number represented by the word PUMAS?
Solution

a) Since the number PUMAS has five digits, and the numbers GATO and PUMA have only four digits, it is necessarily true that the first digit of the number PUMAS is equal to 1, that is, $\mathbf{P}=1$.

b) To find the value of $\mathbf{U}$, we need to note that there are two possibilities:

$$
\mathbf{G}+1=10+\mathbf{U} \quad \text { or } \quad 1+\mathbf{G}+1=10+\mathbf{U}
$$

Note that the second case can only occur if $\mathbf{A}+\mathbf{U}$ is greater than or equal to 9.

In the first case, we have $\mathbf{G}=9+\mathbf{U}$, which is only possible if $\mathbf{G}=9$ and $\mathbf{U}=0$.

In the second case, $\mathbf{G}=8+\mathbf{U}$, which could only happen if $\mathbf{U}$ were equal to 1 or 0. But $\mathbf{U}$ cannot be equal to 1, since we already have $\mathbf{P}=1$. Thus, the only remaining possibility is $\mathbf{U}=0$ and $\mathbf{G}=8$. But with $\mathbf{U}=0$, it could not be that $\mathbf{A}+\mathbf{U}=10$. Therefore, we should have $\mathbf{A}+\mathbf{U}=9$, which would give us $\mathbf{A}=9$. But this cannot happen either, since we would have $\mathbf{M}=\mathbf{A}+\mathbf{U}=9$. Thus, the second case must be discarded.

We conclude then that the first case holds, that is, $\mathbf{U}=0$ and $\mathbf{G}=9$.

c) From items $a$) and $b$), we already know that $\mathbf{P}=1, \mathbf{G}=9$ and $\mathbf{U}=0$. Therefore, the operation

$$
\begin{array}{rccc} 
& \mathbf{G} & \mathbf{A} \mathbf{O} \\
+ & \mathbf{P} & \mathbf{U} & \mathbf{A} \\
\hline \mathbf{P} & \mathbf{U} & \mathbf{M} & \mathbf{A}
\end{array}
$$

can be rewritten as:

|  | 9 | $\mathbf{A}$ | $\mathbf{T}$ | $\mathbf{O}$ |
| ---: | :---: | :---: | :---: | :---: |
| + | 1 | 0 | $\mathbf{M}$ | $\mathbf{A}$ |
| 1 | 0 | $\mathbf{M}$ | $\mathbf{A}$ | $\mathbf{S}$ |

Thus, it also holds that

| $\mathbf{A}$ | $\mathbf{T}$ | $\mathbf{O}$ |
| ---: | ---: | ---: |
| + | $\mathbf{M}$ | $\mathbf{A}$ |
| $\mathbf{M}$ | $\mathbf{A}$ | $\mathbf{S}$ |

Since $\mathbf{A} \neq \mathbf{M}$, this can only happen if $\mathbf{A}+1=\mathbf{M}$. From this, we have two possibilities:

$$
\mathbf{M}+\mathbf{T}=10+\mathbf{A} \quad \text { or } \quad \mathbf{M}+\mathbf{T}+1=10+\mathbf{A}
$$

(Note that the second case occurs when $\mathbf{O}+\mathbf{A} \geq 10$). Since $\mathbf{A}+1=\mathbf{M}$, the first case gives us $\mathbf{T}=9$, which cannot happen, since we already have $\mathbf{G}=9$.

Thus, we conclude that the second case holds: $\mathbf{M}+\mathbf{T}+1=10+\mathbf{A}$. Since $\mathbf{A}+1=\mathbf{M}$ also holds, we can conclude that $\mathbf{T}=8$. Remembering that $\mathbf{O}+\mathbf{A} \geq 10$, and knowing that $\mathbf{S} \neq 0$ and $\mathbf{S} \neq 1$, we must have $\mathbf{O}+\mathbf{A} \geq 12$.

Since $\mathbf{T}=8$, then:

$$
\mathbf{A} \in\{2,3,4,5,6,7\} \quad \text { and } \quad \mathbf{S} \in\{2,3,4,5,6,7\}
$$

Since $\mathbf{A}+1=\mathbf{M}$, $\mathbf{A}$ cannot be 7, because in that case, we would have $\mathbf{M}=8$, which is impossible, since we already know that $\mathbf{T}=8$.

Thus, indeed, we have:

$$
\mathbf{A} \in\{2,3,4,5,6\} \quad \text { and } \quad \mathbf{S} \in\{2,3,4,5,6,7\}
$$

Since $\mathbf{O}+\mathbf{A} \geq 12$, and $\mathbf{O} \neq \mathbf{A}$, the only choice left is

$$
\mathbf{A}=5 \quad \text { and } \quad \mathbf{O}=7
$$

which also gives us $\mathbf{S}=2$. Furthermore, since $\mathbf{A}+1=\mathbf{M}$, we have $\mathbf{M}=6$.

Thus, the number PUMAS is equal to 10652.