# Multiplicative alphametic: This is too hard

• Every letter and every question mark stands for a digit in base-10 representation
• Different letters stand for different digits
• Question marks are placeholders and stand for arbitrary digits (that also may occur for letters)
• Leading digits are always non-zero.

        THIS
*  IS
----
??TOO
HARD?
------
??????


Which digit does each letter represent? (Please present the full analysis how these digits can be determined.)

• I'm not sure I understand the format of your question. Is there a reason that ??TOO and HARD? do not align vertically? Why is THIS * IS all on one line? – Ian MacDonald Mar 1 '16 at 14:29
• I'm not familiar with this notation. should there be a 0 behind HARD? ? – Ivo Beckers Mar 1 '16 at 14:30
• THIS * S = ??TOO, THIS * I = HARD? and the alignment is shifted because IS = I*10 + S. – Piotr Pytlik Mar 1 '16 at 14:55

From the OO in TOO, we have SS mod 10 = IS + (SS div 10) mod 10.

We know S$\neq$0 (otherwise S=O=0). We also have I$\neq$1 (otherwise "HARD?" only has 4 digits).

Discarding solutions where more than one of I,S,O has the same digit, the above equation produces (I,S,O) = (5,7,9), (6,8,4), and (7,9,1).

Case 1: (I,S,O) = (5,7,9)

In TOO, T = 7H+3 mod 10.

With H$\neq$0 in "HARD?" and T$\neq$0 in THIS, and discarding solutions where more than 1 letter has the same digit, we have (T,H) = (4,3) (R=7, discard) or (1,4) ("HARD?" will only have 5 digits, discard).

No solution.

Case 2: (I,S,O) = (6,8,4)

In TOO, T = 8H+5 mod 10.

From TOO, T=8H+5 mod 10. From "HARD?", D=0 and R=6H+4 mod 10.

Using the equations for T and R, T$\neq$0, H$\neq$0, R$\neq$0 and eliminating duplicate digits, we have (T,H,R) = (9,3,2) (A=6, discard) or (1,7,3) (R=6, discard).

No solution.

Case 3: (I,S,O) = (7,9,1)

Following the same procedure as before, T=9H+7 mod 10, and R=7H+5 mod 10.

Eliminating possibilities as before, we're left with (T,H,R) = (4,3,6) or (2,5,0) (H=5, discard).

The only solution is THIS=4379, IS=79, ??TOO=39411, HARD?=30653, ??????=345941.

            4379
*  79
------
39411
30653
------
345941


Substituting our letters, we get the (totally meaningless) statements:

            THIS
*  IS
------
HSTOO
HARDH
------
HTDSTO


Let $P_i^j$ be the product of the $i$th digit in the first number and the $j$th digit in the second number. Let $C_i^j$ be the carry over of $P_i^j$, and let $D_i^j$ be the digit in the result.

For example, $P_3^2$ is the product of H X I.

First off, we can see that $S \notin \{0,1,5,6\}$ since $S \ne O$. Also, if $I \ne 1$ since the second product line is not identical to THIS. So $I \notin \{0,1\}$.

If S=3, then $P_1^1=D_1^1=O=9$ and $C_1^1=0$. We know that $D_2^1=O=9$ as well, but no value for $I$ results in $D_2^1=9$.

If S=4, then $P_1^1=16 \implies D_1^1=O=6$ and $C_1^1=1$. But then we need $P_2^1=I \times S+C_1^1$ to end in 6, which means $I \times S$ ends in 5, which is impossible with an even S.

Thus, $S \in \{2,7,8,9\}$.

## Assume S=2

Thus $P_1^1=D_1^1=O=4$ and $C_1^1=0$. We know that $D_2^1=O=4$ as well, so we know that $I=7$. The means that $D=0$. Since $THIS \times 2$ is a five digit number, we know $T \ge 5$. Also, we know that $C_2^1=1$ and $D_3^1=T$ where $P_3^1=2H+1$ so T is odd.

If T=5, then $2H=4$ only works with $H \in \{2,7\}$, both of which are taken.

Thus, T=9 and $2H=8 \implies H=4$. But then $THIS \times I=9472 \times 7 = 66304$ which means H=A. Contradiction.

## Assume S=7

$P_1^1=49 \implies D_1^1=O=9$ and $C_1^1=4$. To get $D_2^1=9$, we need $I \times S$ to end in 5. This only works when $I=5$. So $P_2^1=I\ times S+C_1^1=5 \times 7+4+39 \implies C_2^1=3$ which means $T=7H+3 \mod 10$

• $H=1 \implies T=0$, but T can't be 0.
• $H=2 \implies T=7$, but 7 is already taken by S
• $H=3 \implies T=4$, but $THIS \times I=4357\times 5=21785\implies A=7$ is already taken by S.
• $H=4 \implies T=1$, but $THIS \times I=1457\times 5=7285 \implies H=0$.
• $H=6 \implies T=5$, but 5 is already taken by I
• $H=8 \implies T=9$, but 9 is already taken by O

## Assume S=8

$P_1^1=64 \implies D_1^1=O=4$ and $C_1^1=6$. To get $D_2^1=4$, we need $I \times S$ to end in 8. This only works when I=6.

Now, $C_2^1=5$, so $T=8H+5 \mod 10$. This means that T is odd and $H\ne5$

• $H=1 \implies T=3$, but $THIS \times I = 3168 \times 6=19008 \implies R=A$
• $H=2 \implies T=1$, but $THIS \times I = 1268 \times 6=4608 \implies H=0$
• $H=3 \implies T=9$, but $THIS \times I = 9368 \times 6=56208 \implies H=5$
• $H=7 \implies T=1$, but $THIS \times I = 1768 \times 6=11208 \implies H=1$
• $H=9 \implies T=7$, but $THIS \times I = 7968 \times 6=47808 \implies H=4$

## Therefore S=9

$P_1^1=81 \implies D_1^1=O=1$ and $C_1^1=8$. To get $D_2^1=1$, we need $I \times S$ to end in 3. This only works when $I=7$.

Now, $C_2^1=7$, so $T=9H+7 \mod 10$.

• $H=2 \implies T=5$, but $THIS \times I = 5279 \times 7=36953 \implies R=9$ which is already taken by S
• $H=4 \implies T=3$, but $THIS \times I = 3479 \times 7=24353 \implies R=3$ which is already taken by T
• $H=5 \implies T=2$, but $THIS \times I = 2579 \times 7=18053 \implies H=1$
• $H=6 \implies T=1$, but 1 is already taken by O
• $H=8 \implies T=9$, but 9 is already taken by S

Thus, $H=3 \implies T=4$.

    4379
*  79
----
39411
30653
------
345941


 4379
 * 79
------
 39411
30653
------
345941

So the letters/digits are:

0 = A
1 = O
3 = H
4 = T
5 = D
6 = R
7 = I
9 = S

When approaching this, I first decided to answer this question:

For any integer i between 1 and 9 inclusive, what s^2 + i*10 gives us a number where the ones and tens places hold the same digit?

0 Would fit the bill, but ??TOO is != 0, so S can't be 0.
1 no
2 -- Maybe if I = 7 (O = 4)
3 no
4 Tens place of 4x4 is odd, so no value of I would work.
S Tens place of 5 squared is not 0 or 5
6 Tens place of 6x6 is odd, so no value of I would make this work.
7 -- Maybe if I = 5 (O = 9)
8 -- Maybe if I = 6 (O = 4)(or S = 1, but I can't be 1 because THIS is not HARD?)
9 -- Maybe if I = 7 (O = 1)

Then, I tried the possible combinations that I found.

Starting the highest possible values for S and I made the most sense to me, which led to the answer. When testing out values of H when I = 7 and S = 9, 3 is the only one that fits. We already know some of the other letters in this test case, so we don't have to test everything. Finally, with only a few values to try, we find that T = 4 fits.

I was hoping that he last row would spell something if we backfilled some of the digits with letters.

But all we get is htdsto.