Ad
  • Custom User Avatar

    I was checking it in one tail recursive loop and simply enforcing the condition that a b and c were ordered least to greatest and check all a b and c that matched  

  • Custom User Avatar

    He made the same solution as I did. The idea is pretty much what you said;
    For each possible side length a, get each possible side length b >= a, and then calculate u=c^2.

    Finally just check that c is an integer (or rather calculate c, followed by checking that c^2 = u), and that it has an acceptable perimeter.

    And then count how many solutions there are. (I guess you did three loops, a, b, c? Or trying to find all for a given perimeter?)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution