Yes, this is a famous cryptarithm. But let’s see how the logic works.
Since there can be no leading zeroes, M=1 because the maximum sum of two different digits between 0 and 9 is 17, which starts with digit 1. So S+1+c=10+O, S=9+O-c where c is a carryover (0 or 1) and because S cannot exceed 9, S=8 (c=1) or 9 (c=0). No matter whether S=8 or 9, O=0.
Now move on. Since O=0 and no two different letters can share the same digit, we know that E+O+c=N. That is, E+c=N because O=0, and c must be 1. Therefore E+1=N and E=N-1. We also know that S=9 because there can be no carryover from the sum of E+O. Now we have used the digits 0, 1 and 9 and the sum is 9END+10RE=10NEY.
We know that E+1=N so there must be a carryover from N+R, therefore N+R+c=10+E=10+N-1. The Ns cancel and we’re left with R+c=9, but R can’t be 9 because S=9 so c=1 and R=8. We now have:
9END+108E=10NEY, and the digits 2, 3, 4, 5, 6, 7 remain. We can produce a set for all possible (E,N)={(2,3) (3,4) (4,5) (5,6) (6,7)}. So we try (2,3) first: 923D+1082=1032Y. That won’t work because D+2=10+Y, D=Y+8 and there are no digits available, so we can eliminate (2,3). (3,4) doesn’t work either:
934D+1083=1043Y, since D+3=10+Y, D=Y+7.
Now try (4,5): 945D+1084=1054Y. D+4=10+Y, D=Y+6. Doesn’t work!
Next, (5,6): D=Y+5. Yes, that could work, because (D,Y)=(7,2):
9567+1085=10652.
How about (6,7)? Available digits are 2, 3, 4, 5 only and D=Y+4. No digits available because the largest difference is 3 and it needs to be 4. So the only answer is 9567+1085=10652.