We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
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
Project Euler #100: Arranged probability
You are viewing a single comment's thread. Return to all 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.
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
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...