## Teaser 2924: Snaking up

**From The Sunday Times, 7th October 2018** [link]

A “Snakes and Ladders” board consists of a 10-by-10 grid of squares. In the first row (at the bottom) the squares are numbered from 1 to 10 from left to right, in the second row the squares are numbered 11 to 20 from right to left, in the third they are 21 to 30 from left to right again, and so on.

An ant started on square 1, moved to square 2 and then, always moving to an adjacent square to the right or up, it finished in the top-right corner of the board. I have added up the total of the numbers on the squares it used and, appropriately, the total is a perfect square. In fact it is the square of one of the numbers the ant visited — the ant passed straight through it without turning.

What was that total of the numbers used?

[teaser2924]

## Jim Randell 8:05 am

on15 April 2019 Permalink |The ant makes 18 moves (9 across and 9 up). So we can make a path by choosing which if the 18 moves is an “up”, and the rest are all “across”.

This Python program runs in 260ms.

Run:[ @repl.it ]Solution:The total of the numbers on the squares that the ant travelled through is 676.676 = 26².

There are three possible paths:

LikeLike