From New Scientist #1158, 7th June 1979 [link] [link]
“A pattern, that’s what I like”, said Uncle Bungle. “I can’t stand a puzzle that is all over the place. But in this long division sum the four figures that are given have the great merit of being consecutive”. I could see my uncle’s point all right, but unfortunately (and this will not I think surprise my readers) his achievements did not come up to his hopes and expectations. I can hardly bear to tell my readers this, but in fact one of those figures was wrong.
The puzzle, as Uncle Bungle gave it to me, looked like this:
Which figure was wrong? Find the correct division sum.
[enigma16]
The following Python program runs in 45ms.
Solution: The figure 4 is wrong, it should be a 5.
The actual division sum is:
Here’s a solution using the [[
SubstitutedDivision()
]] solver from the enigma.py library. It runs in 49ms.Here’s a solution using the [[
SubstitutedExpression()
]] general alphametic solver from the enigma.py library.We don’t need to write a program, just provide the expressions and options as arguments, here is the relevant run file:
It executes in 96ms:
The new [[
SubstitutedDivision()
]] solver in the enigma.py library is based on the [[SubstitutedExpression()
]] solver, so we can have an even simpler run file.This run file executes in 108ms.