### Random Post

### Recent Posts

### Recent Comments

geoffrounce on Enigma 440: Three X | |

Jim Randell on Enigma 1588: As easy as 1… | |

Jim Randell on Enigma 440: Three X | |

geoffrounce on Enigma 1106: Not a square… | |

Jim Randell on Tantalizer 458: Knifemen |

### Archives

### Categories

- article (11)
- enigma (1,156)
- misc (2)
- project euler (2)
- puzzle (39)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,401 hits

Advertisements

This Python program uses the

SubstitutedSum()solver from theenigma.pylibrary. It runs in 923ms.Solution:The correct sum is either: 24994626 + 21098416 = 46093042, or: 24094626 + 21998416 = 46093042.One of the H’s in the two summands should be replaced with an R giving rise to the two answers (both give the same total in the sum), but we can’t determine which one of these is the “correct” sum.

I notice that the pattern 46093042 corresponds to the word SLAPDASH — more appropriate in the context of the puzzle than the meaningless jumble of letters used by the setter.

Here’s a solution that uses MiniZinc. I’ve used the

minizinc.pywrapper to make it simpler to generate the model. This Python 3.6 program executes in 397ms (using the [[mzn-g12fd]] solver – I found quite a wide variation in the run times (and accuracy) of the various solvers, but this one was the quickest, and gave the correct result).I used your idea of a substituted sum in your wrapper to see what it would look like in standard MiniZinc code. The fastest run-time I got was 309 msec – this varied a lot depending which solver I used.