← RoseCode

ROSECODE 464

Special Squares

Philippe_57721 · Programming ·

Two segments AB and CD of length a are joined by a perpendicular BC of length b
The segment AD is the diagonal of a square of side c

For instance, is a=23 and b=94, then c is an integer c=74
In the picture, points B and C fall inside the square, but it is not necessarily the case in general.

How many coprime pairs (a,b) produce an integer side square where the side c107 ?

Answer format: count,a,b

You are given: 161,36737,73474 for a threshold of 1000

My timing: 1 sec