Congruent Numbers
Jump to navigation
Jump to search
This problem gives us two edges of a right triangle, and asks whether the area is integral and the hypotenuse rational
The only difficulty here is we have to use rational math. If we use floats, then we may have an answer which is CLOSE to an integer, but not really.
Checking for area integrality is trivial. Simply perform the calculation and check whether the denominator divides the numerator evenly.
Checking the hypotenuse for rationality involves performing the pythagorean theorem, and then checking whether both the numerator and denominator in reduced form are perfect squares.