Project Euler #75: Singular integer right triangles Discussions | | HackerRank

Project Euler #75: Singular integer right triangles

  • + 0 comments

    Was stuck with the mindset to calculate the primitive triplets of a given perimeter (loop based on the perimeter) one after another, and it was too slow.

    Then I swiched to looping on odd and even m and its corresponding n, and even with occasional gcd() does not make it unacceptably slow. The rest is just implementation of precalculation and dynamic programming. Takes more than 2s in Python, though.