Random Post
Recent Posts
- Enigma 769: Magic square
- BrainTwister #19: Angular arrangements
- Enigma 767: Safety in numbers
- BrainTwister #18: The arithmetical two-step
- Enigma 774: Sting in the tail
- BrainTwister #17: Semi-one numbers
- Enigma 773: Duodecimal
- BrainTwister #16: Order, order!
- Enigma 772: Have you seen the trailer?
- BrainTwister #15: Domino strips
Recent Comments
Archives
Categories
- article (11)
- braintwister (19)
- enigma (1,718)
- enigma-book-1982 (70)
- headscratchers-book-2023 (70)
- microteasers-book-1986 (11)
- misc (7)
- project euler (2)
- puzzle (90)
- puzzle# (249)
- site news (83)
- sphinx (4)
- tantalizer (254)
- tantalizer-book-1970 (40)
- teaser (7)
- today (1)
Site Stats
- 347,493 hits
Another problem that can be fed straight to the [[
SubstitutedDivision()
]] solver from enigma.py.This (single statement) program runs in 350ms.
Solution: The full sum is 760287 / 33 = 23039.
If you like this kind of puzzle you might like to consider a variation on it with the same diagram and following puzzle text:
There is a unique solution.
With the new [[
SubstitutedDivision()
]] solver (in the latest version of the enigma.py library), this code would look like this:And it runs in 144ms (so the new solver is faster than the old one).
Instead of writing a program the arguments can be supplied on the command line, or placed in a run-file:
Which we can execute like this:
By replacing the digit
7
in the puzzle byX
we can get the solutions to both the puzzle and it’s variation:If we run it like this we get both possible values for
X
:Or we can provide additional command line arguments to solve the main puzzle (where
X
should be 7):or the variation (where
X
cannot be 7):I looked at a programme for all solutions where either of the two ‘seven’ digits were different to 7.
I found (4,2), (4,5), (4,8), (4,1), and (4,4) as answers – the latter being Jim’s solution to the extra puzzle he set. A typical solution is set out in the code below and all solutions are given after the programme code.