From 247475f2c409ee66d755cee2495fe1efee9c275d Mon Sep 17 00:00:00 2001 From: Benjamin-Ferrin Date: Wed, 22 Oct 2025 18:26:41 -0400 Subject: [PATCH 1/2] Refactor diophantine_equation.py for clarity --- blockchain/diophantine_equation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockchain/diophantine_equation.py b/blockchain/diophantine_equation.py index ae6a145d2922..6b09637ecc96 100644 --- a/blockchain/diophantine_equation.py +++ b/blockchain/diophantine_equation.py @@ -1,8 +1,6 @@ from __future__ import annotations - from maths.greatest_common_divisor import greatest_common_divisor - def diophantine(a: int, b: int, c: int) -> tuple[float, float]: """ Diophantine Equation : Given integers a,b,c ( at least one of a and b != 0), the @@ -99,6 +97,7 @@ def extended_gcd(a: int, b: int) -> tuple[int, int, int]: return (d, x, y) +# This is very efficient if __name__ == "__main__": from doctest import testmod From 00fa582e441754c822ba8488ae90a9703608bc55 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 22:27:33 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- blockchain/diophantine_equation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockchain/diophantine_equation.py b/blockchain/diophantine_equation.py index 6b09637ecc96..02ff3ffd2f57 100644 --- a/blockchain/diophantine_equation.py +++ b/blockchain/diophantine_equation.py @@ -1,6 +1,7 @@ from __future__ import annotations from maths.greatest_common_divisor import greatest_common_divisor + def diophantine(a: int, b: int, c: int) -> tuple[float, float]: """ Diophantine Equation : Given integers a,b,c ( at least one of a and b != 0), the @@ -97,6 +98,7 @@ def extended_gcd(a: int, b: int) -> tuple[int, int, int]: return (d, x, y) + # This is very efficient if __name__ == "__main__":