### Random Post

### Recent Posts

- Puzzle 69: Division: letters for digits
- Enigma 1106: Not a square unused
- Enigma 405: Uncle bungles the answer
- Enigma 401: Uncle bungles the answer
- Puzzle 70: Football five teams: new method
- Enigma 1107: Factory work
- Enigma 404: Regular timepiece
- Tantalizer 477: Precognition
- Enigma 1108: Every vote counts
- Enigma 403: Taking stock

### Recent Comments

geoffrounce on Enigma 1755: Sudoprime II | |

saracogluahmet on Enigma 1740: Sudoprime | |

Jim Randell on Enigma 1740: Sudoprime | |

geoffrounce on Enigma 1740: Sudoprime | |

geoffrounce on Enigma 1730: Prime positi… |

### Archives

### Categories

- article (11)
- enigma (1,087)
- misc (2)
- project euler (2)
- puzzle (23)
- site news (42)
- tantalizer (23)
- teaser (3)

### Site Stats

- 159,095 hits

This program uses the

SubstitutedSum()solver from theenigma.pylibrary to generate solutions to the addition sum, and then checks them against the multiplication sum (and verifies the extra hint). You could easily write a program which usesitertools.permutations()to generate candidate solutions instead.This Python program runs in 91ms.

Solution:ENIGMA = 279156.So the sums are: 279 + 156 = 435 (ENI + GMA = SUM) and 279 × 156 = 43524 (ENI × GMA = SUMES).

You probably want to check permutations of size 8 rather than 9 (M appears twice in ENI + GMA = SUM), and to be strictly correct you would need to verify that the product is indeed a 5 digit number.