**From New Scientist #2734, 14th November 2009** [link]

I have designed a snakes and ladders board. It is a 10-by-10 grid numbered 1 to 10 from left to right in the bottom row, then 11 to 20 from right to left in the next row, 21 to 30 from left to right in the next and so on, ending at 100 in the top left-hand corner.

Each ladder is a thin straight line from the centre of one square up to the centre of another square. None goes up vertically and no two of the ladders touch or cross each other. If a ladder started, say, in the second row up and went to the seventh row up then it would completely jump over four rows. In fact, my seven ladders all jump over at least one row and they all jump different numbers of rows from each other.

The numbers at the bottom of the ladders are all perfect squares larger than 1, and the numbers at the top of the ladders are all prime numbers. List the starts and finishes of all the ladders (in the form 4-a, 9-b, etc).

[enigma1571]

### Like this:

Like Loading...

The following Python program runs in 105ms (using

`floats`

instead of`Fractions`

gets this down to 40ms).Solution:The ladders are at 4-79, 9-53, 16-97, 25-89, 36-73, 49-71 and 64-83.Here is a diagram showing the location of the ladders: