← RoseCode

ROSECODE 298

Integer medians

Philippe_57721 · Programming ·

The following integer triangle with sides 136, 170, 174 has medians with integer length:
- AP = 158
- BQ = 131
- CR = 127

Find all the integer triangles with perimeter ≤ 10000 having integer medians.
(We consider only primitive triangles: if (a,b,c) is a solution so is (ka,kb,kc). We count only (a,b,c)).

Anser format: Count,a,b,c
(a,b,c being the sides of the triangles).

You are given: 2,390,432,490 for a threshold of 1000

[My timing: 80 sec]