### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

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

### Site Stats

- 175,242 hits

Advertisements

Programming Enigma Puzzles

23 January 2012

Posted by on **From New Scientist #2755, 10th April 2010** [link]

If we take the three-digit number 999 and write it in words as NINE HUNDRED AND NINETY-NINE we can see that its four elements have 4, 7, 3 and 10 letters. If we multiply 4 × 7 × 3 × 10 we get 840, which is some way away from the 999 that we started with.

I invite you to find a three-digit number such that if you multiply together the number of letters in each of its four elements you get the number that you started with.

What is that three-digit number?

[enigma1590]

Advertisements

%d bloggers like this:

The following Python program runs in 34ms.

Solution:The number is 693.Hey, I blogged this problem also! Loved it – see my blog for my thoughts and workings :0) x

That’s neat. Enigma puzzles are – of course – meant to be solved without a computer, but I like to use them as a weekly programming challenge that’s shouldn’t take up too much time, although sometimes there are Enigma puzzles published that are easier to solve with a pencil and paper than a computer (usually those involving cutting up or folding pieces of paper). But I try to make a program that produces a constructive solution, and usually does an exhaustive search of the solution space to make sure I’ve found a possible solutions.