**From New Scientist #2850, 4th February 2012** [link]

A lottery draw, which is televised, uses balls numbered 01 to 39, from which five winning balls are selected and displayed in a row. By the magic of the producer’s graphics software, they are then rearranged into ascending order from left to right, to make checking easier.

One week, two of the winning balls had values less than 10, and the number obtained by reading (from left to right) all 10 digits as a single number was exactly 10 times the number similarly obtained after the balls had been rearranged.

What were the numbers of the five balls, in their original order?

[enigma1683]

### Like this:

Like Loading...

The following Python program runs in 874ms.

Solution:The five balls in the order drawn are: 20, 31, 02, 03 and 10.