### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,609)
- enigma-book-1982 (70)
- misc (5)
- project euler (2)
- puzzle (90)
- puzzle# (173)
- site news (76)
- tantalizer (189)
- teaser (7)
- today (1)

### Site Stats

- 310,317 hits

Programming Enigma Puzzles

24 June 2022

Posted by on **From New Scientist #2012, 13th January 1996** [link]

Harry, Tom and I were challenged to find four perfect cubes, one consisting of one digit, one of two digits, one of three digits and one of four digits, such that the ten digits used included nine different digits. We were allowed to regard 0 as a valid solution for the one-digit cube.

Our solutions were all different. You might say that we each found two solutions, though each of us simply found an alternative for one of our numbers, the other three numbers being common to both solutions. The three numbers common to both my solutions did not appear in any of Harry’s or Tom’s solutions.

Please list those three numbers in ascending order.

[enigma857]

%d bloggers like this:

This Python program runs in 61m. (Internal runtime is 2.2ms).

Run:[ @replit ]Solution:The numbers were: 64, 729 5832.The setters numbers were: (0|1, 64, 729 5832).

Harry and Tom’s numbers were: (0|1, 27 343 6859), (8, 27, 125|512, 4096).

There are only 6 sets of cubes that use 9 different digits, and these combine to form 3 pairs, where each pair has 3 numbers in common. And these 3 pairs are the pairs found by T, D, H.

A part programme/part manual solution.

I chose to find the 6 sets of cubes for Tom, Dick and Harry and then manually annotate the multiple outputs to show that the conditions of the teaser had been met.

Following GeoffR’s approach.