Answer:
{A, H, M, O, P, R, S, T} = {1, 7, 5, 0, 8, 6, 4, 9}
or
{O, A, S, M, R, H, P, T} = {0, 1, 4, 5, 6, 7, 8, 9}
Step-by-step explanation:
Starting in the thousands column, we see the sum P+M+A mod 10 = M, so P + A = 10 or 11. That is, there is a carry to the next column of 1, meaning T + 1 = O, and that sum must also create a carry of 1, so S + 1 = M.
In order for T + 1 to generate a carry, we must have T = 9 and O = 0.
Now, consider the 10s column. This has 36 +A +(carry in) mod 10 = 9. So, A+(carry in) = 3.
Considering the 1s column, we have 9+0+2H+S = H+10 or H+20. We know H+S+9 cannot be 10, so it must be 20. That means H+S = 11, and (carry in) to the 10s column must be 2. Since A = 3 - (carry in), we must have A=1.
At this point, we have ... A=1, T=9, O=0, S+H=11, S+1=M.
Now, consider the 100s column. We know the carry in from the 10s column is 3, so we have 3+2A+R=A+10. Since we know A=1, this means 5+R=11, or R=6.
The carry in to the 1000s column is 1, so we have P+A+1 = 10, or P=8.
__
Our assignments so far are ...
0 = O, 1 = A, 6 = R, 8 = P, 9 = T.
and we need to find S, M, and H such that M=S+1 and S+H=11. We know S and H cannot be 2, 3, or 5, because the 11's complement of those digits is already assigned. That leaves 4 and 7 for S and H, but we also need an unassigned value that is 1 more than S. These considerations make it necessary that S=4, M=5, H=7.
Then the addition problem is ...
8197 + 90 + 5197 +491694 +19 = 505197
_____
Final assignments are ...
O = 0, A = 1, S = 4, M = 5, R = 6, H = 7, P = 8, T = 9