In Round 211, the 'Lenny' authors wrote:518 x 70 = 6270
6481 + 3294 = 32847
7221 x ( 3334 + 3666 ) = ?
Using letters to stand for the unknown (correct) values, and starting with the addition (which is
way simpler), we have:
Code: A B C D
+ E F G B
---------
E F C G H
Clearly, since we are adding only two values in the thousands column, we can have a carry of only "1", so E = 1.
Code: A B C D
+ 1 F G B
---------
1 F C G H
Considering the thousands column, we have A + 1 = F + 10 or else 1 + A + 1 = F + 10, depending upon whether there was a carry from the hundreds column. If there was, then A - F = 8, so A = 8 and F = 0. If there wasn't, then A - F = 9. If A = 8 then F = 1, but E already equals 1. If A = 9, then F = 0. Either way, F = 0, so:
Code: A B C D
+ 1 0 G B
---------
1 0 C G H
Turning now to the hundreds column, if there is no carry from the tens column, then B + 0 = C, so B = C. So there has to be a carry from the tens, and the hundreds addition is actually 1 + B + 0 = C (or C + 10, if there's a carry to the thousands); that is, 1 + B = C (or C + 10).
Suppose there is a carry from this column into the thousands. Then 1 + B = C + 10, so C = B - 9. The only way for C to be non-negative is for B to equal 9, so C = 0. But F = 0. So there can't be a carry from this column; that is, it must be that 1 + B = C, not C + 10.
Including the carries we have determined, we now have:
Code: 0 1 ?
A B C D
+ 1 0 G B
---------
1 0 C G H
Since there is no carry to the thousands column, then A + 1 = 10, and A = 9:
Code: 0 1 ?
9 B C D
+ 1 0 G B
---------
1 0 C G H
Looking at the ones column, we have D + B = H or D + B = H + 10. If D + B = H, so there's no carry to the tens, then, because we know the tens column has a carry into the hundreds column, we have:
. . . . .C + G = B + 10
Since C = B + 1, we have:
. . . . .B + 1 + G = B + 10
. . . . .1 + G = 10
. . . . .G = 9
But A = 9, so this can't work. Then we must have D + B = H + 10, so, in the tens column, we have:
. . . . .1 + C + G = B + 10
. . . . .1 + B + 1 + G = B + 10
. . . . .2 + G = 10
. . . . .G = 8
So far, then, we have E = 1, F = 0, A = 9, G = 8, and the fact that there are carries from the ones to the tens and the tens to the hundreds:
Code: 0 1 1
9 B C D
+ 1 0 8 B
---------
1 0 C 8 H
Looking again at the ones column, we have D + B = H + 10, and the digits 2, 3, 4, 5, 6, and 7 are still available. If either of D and B is 2, then we cannot get a carry (H + 10) with the numbers we have left, since the biggest sum would be 2 + 7 = 9. Consider the other cases:
. . . . .D + B = 10 => H = 0 (No: F = 0)
. . . . .D + B = 11 => H = 1 (No: E = 1)
. . . . .D + B = 12 => H = 2, so D, B = 5, 7
. . . . .D + B = 13 => H = 3, so D, B = 6, 7
. . . . .D + B = 14 => H = 4, but D = B = 7 (So no.)
And D + B can't be any larger sum, because the larger summands are already spoken for. Our only two possibilities are D, B = 5, 7 and D, B = 6, 7. Then B equals 5, 6, or 7.
At this point, we need to turn to the multiplication. Using additional letters to stand for the new numbers, we have:
Code:
Since C = B + 1, the first multiplication (the only one we can really work with) is (B + 1)(M) = M (or M + 10). In other words, whatever the multiplication is, the ones digit is duplicated. We are limited on the values for B (and thus C), so let's work through the options:
. . . . .. . . . .. . . . .. . . . .. . . . .B = 7, so C = 8: But G = 8 (No.)
From the last bit we'd done with the addition, we know that, if B = 5, then D = 7 and H = 2. If B = 6, then D = 7 and H = 3. Either way, D = 7, so:
Code: 0 1 1
9 B C 7
+ 1 0 8 B
---------
1 0 C 8 H
Also, if B = 5 (so H = 2), then C = 6 and M = 4. If B = 6 (so H = 3), then C = 7 and M = 5. But we already determined that D = 7, so C cannot be 7 and B must be 5.
So far, we have E = 1, F = 0, A = 9, G = 8, D = 7, B = 5, H = 2, C = 6, and M = 4:
Code: 0 1 1
9 5 6 7
+ 1 0 8 5
---------
1 0 6 8 2
And this works out correctly. Checking with the multiplication, we have:
Code:
The multiplication, in the coded form, is A F H M, which translates as 9 0 2 4, so the translation "checks". The only digit (0-9) unaccounted for is 3, so L = 3. Our coding, from "wrong" to "code" to "right", is:
Code:0 1 2 3 4 5 6 7 8 9 <== wrong
| | | | | | | | | |
M D F E B L A H C G <== code
| | | | | | | | | |
4 7 0 1 5 3 9 2 6 8 <== right
The final expression is:
. . . . .7221 x ( 3334 + 3666 )
Translating from "wrong" to "code" to "right", we get:
. . . . .2007 (1115 + 1999)
This equals 6,249,798 in "right" numbers. To put the numbers "wrong", we have to work backwords through the above coding process:
Code:0 1 2 3 4 5 6 7 8 9 <== right
| | | | | | | | | |
F E H L M B C D G A <== code
| | | | | | | | | |
2 3 7 5 0 4 8 1 9 6 <== wrong
Working through the steps, we find that 6,249,798 would be printed as:
. . . . .8706169 <== ANSWER
As always, please check my work.
Eliz.