### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,158)
- misc (2)
- project euler (2)
- puzzle (40)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,959 hits

Advertisements

Programming Enigma Puzzles

27 May 2016

Posted by on **From New Scientist #1495, 13th February 1986** [link]

Five football teams, A, B, C, D and E, are to play each other once. After some of the games had been played a table was drawn up giving some details of the matches played, won, lost etc.

Unfortunately, the digits had been replaced by letters. Each letter stood for the same digit (from 0 to 9) wherever it appeared, and different letters stood from different digits.

The table looked like this:

(Two points are given for a win and one point to each side in a drawn match).

Find the score in each match.

[enigma346]

Advertisements

%d bloggers like this:

This program uses the

Football()helper class (and the newFootball.substituted_table*()solvers) from theenigma.pylibrary. It runs in 370ms.Solution:The scores in the played matches are: A vs B = 1 – 0; A vs D = 0 – 4; B vs C = 0 – 2; B vs D = 1 – 2; C vs D = 3 – 0; D vs E = 3 – 3.The following matches are not yet played: A vs C; A vs E; B vs E; C vs E.