Since this was solved for non-distinct digits, I'm trying to get the maximum out of "MATH" with distinct digits. So the first try is with >! M = 9. We imediately see that S needs to be 8. >! We get >! <pre> >! AWE + >! 8O9E = >! 9ATH >! </pre> >! Since the hundreds of "AWE" and "MATH" need to be the same ("A") ?this means that "O" needs to be 0 and 9+W must not go over 10 so we don't get a 1 to carry. this means that W is also 0. So this does not work. So my seconds try is with >! M = 8 so S = 7 >! <pre> >! AWE + >! 7O8E = >! 8ATH >! </pre> >! Now we try to maximize "A". Let's go with the obvious 9. This means again O = 0 or 1 and we get. >! <pre> >! 9WE + >! 708E = >! 89TH >! </pre> >! now 8+w must not go over 10 so w = 1 ('cuz 0 is taken). But this leads to T being either 9 or 0 (if E+E go over 10) but both 9 and 0 are taken. >! continuing to maximize A.... so 9 does not work, 8 and 7 are taken by M and S....so 6 >! <pre> >! 6WE + >! 7O8E = >! 86TH >! </pre> >! if O = 0 we end up with a similar contradiction as above, so lets try with o = 9 and w+8+(a possible carry from E+E) go over 10. >! <pre> >! 6WE + >! 798E = >! 86TH >! </pre> >! Now lets maximize T in math. 9, 8, 7, 6 are taken so lets go with 5. This means W+8+(possible carry from E+E) = 15. This leads to W being either 6 or 7 but they are already taken by A and S. >! so lets go with T = 4. This means W+8+(possible carry from E+E) = 14. So W is 5 or 6. 6 is taken by A so W = 5. >! <pre> >! 65E + >! 798E = >! 864H >! </pre> >! NOw E+ E needs to go over 10. but all of 5, 6, 7, 8, 9 are taken. So this is no good. >! so let's try with T = 3. This means W+8+(possible carry from E+E) = 13. So W is 4 or 5. >! If w = 5 >! <pre> >! 65E + >! 798E = >! 863H >! </pre> >! E+E should be below 10. E cannot be 0 because H would be 0. SO it can be 1, 2, 4 (3 is taken by T). If it's 4 then H would be 8 which is taken by M. >! It works with both 1 and 2 but to maximize "math" we go with 2. So the final result: >! <pre> >! 652 + >! 7982 = >! 8634 >! </pre>