# Enigmatic Code

Programming Enigma Puzzles

## Enigma 376: Letters decide to divide

From New Scientist #1525, 11th September 1986 [link]

In the following division sum each letter stands for a different digit.

Rewrite the sum with the letters replaced by digits.

[enigma376]

### 4 responses to “Enigma 376: Letters decide to divide”

1. Jim Randell 23 December 2016 at 8:20 am

We can solve this using the SubstitutedDivision() solver from the enigma.py library.

Here I’ve put all the command line arguments into a run file, rather than write a separate program:

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

# solver to use
SubstitutedDivision

# the main division sum
"mtxexh / kd = mpex"

# the intermediate subtraction sums
"mtx - ddx = kl"
"kle - eme = hl"
"hlx - skt = xt"
"xth - thh = sl"
```

we can then run the solver directly from the command line:

```% python -m enigma -r enigma376.run
[solving mtxexh / kd = mpex, [('mtx', 'ddx', 'kl'), ('kle', 'eme', 'hl'), ('hlx', 'skt', 'xt'), ('xth', 'thh', 'sl')] ...]
412726 / 83 = 4972 rem 50 [d=3 e=7 h=6 k=8 l=0 m=4 p=9 s=5 t=1 x=2] [412 - 332 = 80, 807 - 747 = 60, 602 - 581 = 21, 216 - 166 = 50]
```

This runs in 80ms.

Solution: The sum is given below:

2. Hugh Casement 23 December 2016 at 8:28 am

I divided AH into WISEST and obtained the quotient WOES.
These puzzles using a random collection of letters are indeed woeful.

3. Naim Uygun 24 December 2016 at 4:33 pm

I think, your puzzle is indeed woeful.

4. Naim Uygun 24 December 2016 at 4:49 pm

Do you intend this division:
Dividend=431612, Divisor=87, Quotient=4961, Remainder=5