Project Euler #100: Arranged probability

  • + 2 comments

    Understanding why this statement is false is crucial to solving some of the test cases: "Q as a perfect square should result in No solution." The same applies to PQ.

    • + 0 comments

      but if you look at q as 4 which is perfect square,and p as 3, so we ended up with 3/4 which we can get from (7/8)x(6/7). I guess both q and p can be perfect square,unless they aren't perfect square at the same time because then whole fraction will be perfect square

    • + 0 comments

      I believe based on the algebra it's only whether PQ is a square, as that is the D if you turn everything into a general Pell's Equation

      edit: Belay that...to my chagrin, P = 1, Q = 36 has a solution...