### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

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

### Site Stats

- 177,972 hits

Advertisements

Programming Enigma Puzzles

2 December 2011

Posted by on **From New Scientist #2836, 29th October 2011** [link]

I recently set a class the following puzzle: “Write down four positive whole numbers less than 100 and then write down their average: choose the original numbers so that overall the five numbers written down use each of the digits 1 to 9 exactly once.”

Three Scandinavian lads in the class were successful. Hola came up with 9, 15, 36 and 48, with average 27. Frack was more cunning – his average was not a whole number – it involved a fraction in its simplest form, like 27¾. Dessie was devious, too, and his average, which was lower than Frack’s, was not a whole number – it involved decimals, like 16.25.

What averages did Frack and Dessie write?

[enigma1670]

Advertisements

%d bloggers like this:

Slightly tricky, as we have to deal with both fractional and decimal representations.

This solution is not very quick: 14s (3.8s using PyPy).

Solution:Frack’s average is 25 3/4. Dessie’s average is 24.75.