### Random Post

### Recent Posts

- Enigma 1101: Disappearing numbers
- Enigma 410: Most right
- Tantalizer 475: League table
- Enigma 1102: The Apathy Party
- Enigma 409: Hands and feet
- Puzzle 68: Football and addition: letters for digits
- Enigma 1103: Brush strokes
- Enigma 408: Royal numbers
- Tantalizer 476: Take your partners
- Enigma 1104: Odd and even squares

### Recent Comments

Jim Randell on Enigma 1313: Triangles | |

geoffrounce on Enigma 1313: Triangles | |

Jim Randell on Enigma 1313: Triangles | |

Jim Randell on Enigma 1101: Disappearing… | |

Jim Randell on Enigma 409: Hands and fee… |

### Archives

### Categories

- article (11)
- enigma (1,097)
- misc (2)
- project euler (2)
- puzzle (24)
- site news (42)
- tantalizer (25)
- teaser (3)

### Site Stats

- 161,757 hits

This is my original Perl version. It runs in 28ms.

Solution:(a) I = 6, (b) N = 4.And here’s a much more compact (but slower) Python version. It uses the same observation about odd/even numbers as the Perl version, but it permutes the letters assigned to the numbers rather than vice versa. It runs in 149ms.

The following provides a simple but slow solution that can be made much more efficient by building in more intelligence

The digit sum of each word must be a multiple of 3. IMAGINE is an anagram of ENIGMA with an additional I. Since I is even but not 0 it must be 6, I don’t see any short cut for N.