**From New Scientist #2702, 4th April 2009** [link]

As I have mentioned in a previous Enigma puzzle, a “Snakes and Ladders” board consists of a 10-by-10 grid of squares. In row 1 (at the bottom) the squares are numbered from 1 to 10 from left to right. Then in row 2 the squares are numbered 11 to 20 from right to left. In row 3 they are 21 to 30 from left to right again, and so on, ending up at square 100 in column 1 and row 10.

I have been cutting up such a board. I have cut out a rectangle consisting precisely of some of its squares. It runs from a prime-numbered row of the original board to a higher prime-numbered row inclusive, and it runs from a prime-numbered column to a higher prime-numbered column inclusive. Furthermore, the total of all the numbers in my rectangle is a prime.

What is that total?

[enigma1539]

### Like this:

Like Loading...

Here’s my original Perl code. It runs in 13ms.

Solution:The sum of the numbers in the rectangle is 449.And here’s my Python solution. It runs in 37ms.