Takes 42 seconds. I found the perimeter p<1000 which maximizes the number of possible right triangles.