### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Puzzle #52: Bus change | |

Jim Randell on Enigma 967: Prime cubes | |

GeoffR on Enigma 1707: Making progr… | |

Jim Randell on Enigma 1707: Making progr… | |

Jim Randell on Tantalizer 409: Fe, Fi, Fo,… |

### Archives

### Categories

- article (11)
- enigma (1,364)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (47)
- site news (58)
- tantalizer (92)
- teaser (7)

### Site Stats

- 231,896 hits

This Python program runs in 65ms.

I have another version that runs in 34ms that does more early rejection based on the fact 3×A must end in A, and 3×TA must end in TA, but it’s a much longer program. In fact, it’s pretty obvious what A and T must be given this constraint, and if you modify this program to start with those values for A and T it only takes 32ms to run.

Solution: THEBES = 542823.Here’s a solution that uses the [[

`SubstitutedSum()`

]] solver from theenigma.pymodule. Although it’s not that much shorter, but it is a little bit faster – it runs in 45ms.@Jim: Would your filter_unique library function work OK on this Enigma ?

@geoff: Yes, you can use the [[

`filter_unique()`

]] function in a solution to this problem:The strange thing is that the “even if I told you the value of B, you still could not find all the digits” part of the puzzle is superfluous. As you have found you can just write a program that ignores this part of the puzzle and instead uses the fact that PSI and PHI are prime. This “additional” fact actually narrows the possible solutions to a single candidate anyway, so you can do without line 15 and the call to [[

`filter_unique()`

]].