## Teaser 2910: Living on the coast

**From The Sunday Times, 1st July 2018** [link]

George and Martha are living on Pythag Island. Not surprisingly, it is in the shape of a right-angled triangle, and each side is an integral number of miles (under one hundred) long. Martha noticed that the area of the island (expressed in square miles) was equal to an exact multiple of its perimeter (expressed in miles). George was trying to work out that multiple, but gave up: “Please write down the appropriate digit” he said. “Impossible!” said Martha.

What are the lengths of the coasts?

[teaser2910]

## Jim Randell 3:07 pm

on21 February 2019 Permalink |Suppose the triangle has sides

x, y, zwhere0 < x < y < z < 100.We have:

Consider:

So:

This Python program uses the [[

`pythagorean_triples()`

]] function from theenigma.pylibrary to find appropriate triangles. The routine itself uses the technique described at [ @Wikipedia ]. It runs in 71ms.Run:[ @repl.it ]Solution:The lengths of the coasts (in miles) are 65, 72, 97.LikeLike

## GeoffR 1:26 pm

on22 February 2019 Permalink |LikeLike