### 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

Here’s my first attempt in Python. It’s not very quick though, it takes 4.5s under PyPy. I shall see if I can come up with a more efficient version later.

Solution:The odd number out is 185.The non-square is OUT, with value 185.

The remaining numbers are: CAST = 3025 (55²), THE = 576 (24²), ODD = 144 (12²), ONE = 196 (14²).

Here is my program:

OK, here’s a more efficient version. It runs in 246ms.

And here’s a version that uses the

SubstitutedExpression()solver from theenigma.pylibrary (which didn’t exist when the puzzle was originally posted).It considers the problem as 5 different alphametic puzzles, where each one considers a different candidate word as being the non-square. It runs in 102ms.

And here’s yet one more

It is easy to deduce that the non-square has to be one of ODD, ONE or OUT, so I intended the code to test all these cases, but got lucky by finding that OUT is the non-square. The code runs in 35ms

Code tidied up a bit :