From New Scientist #1149, 5th April 1979 [link]
In the following football league table and addition sum, letters have been substituted for digits (from 0 to 9). The same letter stands for the same digit wherever it appears and different letters stand for different digits. The four teams are eventually going to play each other once. (Two points are given for a win and one point to each side in a drawn match).
Find the scores in the football matches and write out the addition sum with numbers substituted for letters.
[enigma7]
The following Python program runs in 2.0s.
Solution: The scores in the played matches are: A v B: 3-4; A v D: 2-0; B v C: 2-5; B v D: 1-0; and the addition sum is: 53 + 21 = 74.
I’ve collected some routines that are useful for many of these puzzles involving football league tables into a [[
Football()
]] class, which I shall add to the enigma.py library for future use. Using them, this Python 3 program runs in 38ms.Here’s a solution that combines the (newly added) [[
Football.substituted_table*()
]] solvers and the [[SubstitutedSum()
]] solver from the enigma.py library.It doesn’t require any additional analysis, and runs in 80ms.
Run: [ @replit ]