# Sunday Times Teaser 2840 – Signs of the Times

*by Victor Bryant*

#### Published February 26 2017 (link)

I was taking a gentle morning drive along the straight road to Secombe that passes through Firsk. Before reaching Firsk I passed three signposts, each giving the distances to Firsk and to Secombe (to the nearest mile). All six distances displayed were different and, amazingly, all were perfect squares.

What were the two distances given on the first signpost (furthest from Firsk)?

3 Comments
Leave one →

There are multiple solutions, of which it seems likely that the intended answer is the one with the smallest distance to Secombe.

and here is an alternative approach

It has been suggested on my other Sunday Times Teaser website that the differences between squares on each signpost don’t need to be the same because they are only listed to the nearest mile. I don’t consider this possibility above but I think it is reasonable since distances of hundreds of miles don’t equate to a “gentle morning drive”. So here is a solution that considers this possibility, one which produces a more likely answer. This currently does more work than is necessary so I might tidy it up later (I might not!).

Here’s a solution that uses intervals, so that the distances involved don’t have to be integral numbers of miles.

By default the distances given on the signs is limited to be below 100 miles, which gives a unique solution in 47ms (but this limit can be specified on the command line).

The

enigma.pylibrary is available at [ https://www.magwag.plus.com/jim/enigma.html ].If we limit the morning drive to 200 miles then here is my exact solution:

And if we prefer a more gentler drive of less than 100 miles then here is the modified code for signposts to the nearest mile: