# Enigmatic Code

Programming Enigma Puzzles

## Puzzle 83: Division: some letters for digits, some missing

From New Scientist #1134, 21st December 1978 [link]

In the following division sum, some of the digits are missing, and some are replaced by letters. The same letter stands for the same digit wherever it appears.

Find the correct sum.

[puzzle83]

### One response to “Puzzle 83: Division: some letters for digits, some missing”

1. Jim Randell 25 January 2017 at 8:45 am

We can solve this puzzle directly using the [[ `SubstitutedDivision()` ]] solver from the enigma.py library:

This run file executes in 183ms.

```#!/usr/bin/env python -m enigma -r

# solver to use
SubstitutedDivision

# the division sum
"t?mp? / ?? = ?xt"

# the intermediate subtraction sums
"t?m - y?? = ya"
"ya? - ymx = x"
"x? - ?a = 0"
```

Or, with a bit more work, we can use the generic alphametic solver [[ `SubstitutedExpression()` ]], also from the enigma.py library, which executes a bit quicker, in 87ms.

```#!/usr/bin/env python -m enigma -r

#            A x t
#      -----------
#  B C ) t D m p E
#        y F G
#        -----
#          y a p
#          y m x
#          -----
#              x H
#              I a
#              ===

# solver to use
SubstitutedExpression

# solver parameters
--symbols="amptxyABCDEFGHI"
--distinct="amptxy"

# the division sum
"Axt * BC = tDmpE"

# the multiples
"A * BC = yFG"
"x * BC = ymx"
"t * BC = xH"

# the intermediate subtraction sums
"tDm - yFG = ya"
"yap - ymx = x"
"xH - Ia = 0"
```

Solution: The correct division sum is 20304 ÷ 27 = 752.

This site uses Akismet to reduce spam. Learn how your comment data is processed.