### 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,129 hits

Programming Enigma Puzzles

6 August 2013

Posted by on **From New Scientist #2565, 19th August 2006**

Find a 2-digit integer, a 3-digit integer and a 4-digit integer that between them use all the digits 1-9 in such a way that each integer is divisible by each of its digits; in addition the sum of the three integers must be a 4-digit number that consists of four different digits and is itself divisible by each of its four digits.

What are the three integers?

[enigma1405]

%d bloggers like this:

This Python program runs in 55ms.

Solution:The three integers are 48, 672 and 3195.Here is my solution:

We can solve this puzzle using the [[

`SubstitutedExpression()`

]] solver from theenigma.pylibrary. (You will need version 2017-03-24 or later to use the extended [[`distinct`

]] parameter – see my comment onEnigma 389).The following run file executes in 83ms.

The two four digit numbers contain the same digits, although this is not a stated constraint