### Random Post

### Recent Posts

- Enigma 1065: Cute cubes
- Enigma 444: Rows and rows
- Puzzle 50: Football and addition
- Enigma 1066: Members of the clubs
- Enigma 443: The bells they are a-changing
- Tantalizer 455: Ballistico
- Tantalizer 456: Square deal
- Enigma 1067: Bye!
- Enigma 442b: Oh yes I did! Oh no you didn’t!
- Puzzle 51: A multiplication

### Recent Comments

Brian Gladman on Enigma 1065: Cute cubes | |

Jim Randell on Enigma 1065: Cute cubes | |

geoffrounce on Enigma 444: Rows and rows | |

Jim Randell on Enigma 444: Rows and rows | |

geoffrounce on Enigma 1611: Three sister… |

### Archives

### Categories

- article (11)
- enigma (1,167)
- misc (2)
- project euler (2)
- puzzle (42)
- site news (45)
- tantalizer (45)
- teaser (3)

### Site Stats

- 180,599 hits

Advertisements

This Python code runs in 117ms.

Solution:You found 10647.There are only three numbers with the required property. Harry and Tom found the other two:

A bit of analysis gives a very short program to find the three candidate numbers. This Python program runs in 35ms.

A MiniZinc solution gave the same three numbers :

It it easy to show that both 5-digit numbers have to be multiples of 9, so the for loop can be

for a in irange(10242,10876,9):Good point. Every little helps. Only 24 of the remaining candidates for

ahave no repeated digits and don’t include the digit 9, so this gives a way to achieve a manual solution.