### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,367)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (48)
- site news (58)
- tantalizer (94)
- teaser (7)

### Site Stats

- 233,130 hits

Programming Enigma Puzzles

11 March 2019

Posted by on **From New Scientist #1642, 10th December 1988** [link]

These are, in fact, the same product done by long multiplication in two different ways, with the two multiplicands simply reversed in order. Between them, those two three-figure numbers use six different non-zero digits. And the final answer, which is of course the same for both, has all the digits different and non-zero.

What is the final answer?

[enigma491]

%d bloggers like this:

We can use the [[

`SubstitutedExpression()`

]] solver from theenigma.pylibrary to solve this problem as a set of alphametic constraints.This run file executes in 160ms.

Run:[ @repl.it ]Solution:The result of the sum is 127458.The sum is: 291 × 438 = 127458.

Which gives intermediate products of:

Writing the sum as: 438 × 291 = 127458, gives intermediate products of:

We have to assume the missing figures in the teaser description are zeros, which seems reasonable.

I guess you are quoting the internediate products from your solver, rather than the actual partial products, which look to be:

1) 116,400 + 8,730 + 2,328 = 127458

and

2) 87,600 + 39,420 + 438 = 127458

The way I was taught long multiplication at school is consistent with the diagrams shown (although I think we would have done the intermediate products in the reverse order – units, then tens, then hundreds), and in this technique you don’t include the 0’s for the powers of ten in the calculation. Instead the position of the intermediate products shows which column of the result the digit belongs. So the intermediate products I give are the numbers that fit in between the thinner horizontal lines in the diagram.

There have been

Enigmapuzzles that have used slightly different conventions when laying out long multiplication sums, but it’s usually pretty obvious what they mean.