### Random Post

### Recent Posts

- Puzzle 20: “I do not wish to be, I’d like to add”
- Enigma 504: Hooray for Hollywood
- Puzzle #07: Amveriric’s boat
- Enigma 1006: Booklist
- Tantalizer 427: Pub crawl
- Enigma 503: Early in the season
- Puzzle #06: Darts challenge
- Enigma 1007: Triangular and Fibonacci cubes
- Puzzle 21: Cricket (4 teams)
- Enigma 502: Fill this up!

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,287)
- misc (3)
- project euler (2)
- puzzle (72)
- puzzle# (7)
- site news (52)
- tantalizer (73)
- teaser (7)

### Site Stats

- 210,013 hits

We can use the [[

SubstitutedDivision()]] solver from theenigma.pylibrary to solve this puzzle.We can use the [[

--extra]] parameter to include the additional check that all digits between 2 and 9 occur at least twice in the completed sum.This run file executes in 134ms.

Run:[ @repl.it ]Solution:The dividend is 253536.The full sum is: 253536 ÷ 32 = 7923.

I have been playing with Jim’s excellent minizinc.py wrapper for the MiniZinc constraint solver so this seemed like a nice puzzle to try it out.

I think that because there are some symbols that appear more than once in the sum the code that count their occurrences needs a minor adjustment. (Although it doesn’t change the answer that is found – you can change the string of symbols to check to a 29 character string).

But as you construct the original sum to output the solution you could move the check into the Python code, and have a simpler

MiniZincmodel (although this requires MiniZinc to be returning all solutions (which is the default behaviour)).A standard MiniZinc solution.