Project Euler #138: Special isosceles triangles

Sort by

recency

|

6 Discussions

|

  • + 0 comments

    im guessing the solution should be faster than O(n) and cannot be simply solved by using Pells Equation ?

  • + 1 comment

    Case 1 in .2 sec, case 2 in .23 sec, but my method has no chance for N = 10^18.

    I generate and save a list of solutions for i = 1, ..., 1000000 mod 1e9+7. Not happening with N = 10^18.

    Do I need a different method or am I missing something?

    • + 0 comments

      Followed a winding path to finally solve this one. Test case 3 in .31 seconds.

  • + 1 comment

    timed out by 4s. i calculated hypotenuse by using successive side lengths.

    • Asked to answer
      + 0 comments

      You can try something else algo or try to minimise loops, share your code of you can.

  • + 1 comment

    test care 0 is incorrect. you have mentioned L=305 for 2nd case and still it says 322 dont understand how

    • + 0 comments

      2 nd case means 17+305 u need to sum up first and second L's

  • + 1 comment

    Test Case #0: 0.05s Test Case #1: 1.02s Test Case #2: 1.1s Test Case #3: 1.16s

    • + 0 comments

      Can you please share your approach to the qstn. I believe a slight insight might help beginners like me to grab something potentially large