← RoseCode

ROSECODE 462

Decomposable Triangles

Philippe_57721 · Programming ·

An integer equilateral triangle is decomposable if it can be split in 2 integer triangles.

For instance, the triangle (8,8,8) can be decomposed as (8,3,7) + (8,5,7)


How many triangles (T) with side 107 are decomposable?
Which triangle (L) has the largest number of decompositions?(if multiple possibilities, give the largest one)
How many decompositions (D) does it possess?

For instance, the triangle (2592,2592,2592) has 3 decompositions:
- (2592 2457 297)+(2592 2457 2295)
- (2592 2322 702)+(2592 2322 1890)
- (2592 2268 972)+(2592 2268 1620)

Answer format: T,L,D

You are given: 364,960,8 // For triangles with side 1000

My timing: 20 sec