Problem 296: Angular Bisector and Tangent

FCC link

Given is an integer sided triangle ABC with BC ≤ AC ≤ AB.k is the angular bisector of angle ACB.m is the tangent at C to the circumscribed circle of ABC.n is a line parallel to m through B.

The intersection of n and k is called E.

How many triangles ABC with a perimeter not exceeding 100 000 exist such that BE has integral length?

Test

{{test}}

Console output