### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,123)
- misc (2)
- project euler (2)
- puzzle (31)
- site news (43)
- tantalizer (31)
- teaser (3)

### Site Stats

- 168,355 hits

Programming Enigma Puzzles

20 February 2012

Posted by on **From New Scientist #2733, 7th November 2009** [link]

1. Find the set of perfect cubes that between them use each of the digits 0 to 9 at least once whose sum is as small as possible. What is the sum of your set of cubes?

2. Find the set of perfect cubes that between them use each of the digits 0 to 9 exactly once whose sum is as small as possible. What is the sum of your set of cubes?

In answering either of these questions you may, if you wish, treat 0 as itself being a cube.

I think the question is expecting you to use **non-negative** cubes when constructing the sets.

[enigma1570]

Advertisements

%d bloggers like this:

The following Python program solves both parts and runs in 57ms.

I decided to use classes to wrap the “best” solutions.

Solution:The sum for part 1 is 1269. The sum for part 2 is 205452.