Skip to content

Fix mypy in #3149 #3988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pre-commit
  • Loading branch information
poyea committed Nov 29, 2020
commit 83968c4116d596a1a19953058506303ca73fc98a
7 changes: 4 additions & 3 deletions blockchain/diophantine_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ def diophantine_all_soln(a: int, b: int, c: int, n: int = 2) -> None:

Finding All solutions of Diophantine Equations:

Theorem : Let gcd(a,b) = d, a = d*p, b = d*q. If (x0,y0) is a solution of Diophantine
Equation a*x + b*y = c. a*x0 + b*y0 = c, then all the solutions have the form
a(x0 + t*q) + b(y0 - t*p) = c, where t is an arbitrary integer.
Theorem : Let gcd(a,b) = d, a = d*p, b = d*q. If (x0,y0) is a solution of
Diophantine Equation a*x + b*y = c. a*x0 + b*y0 = c, then all the
solutions have the form a(x0 + t*q) + b(y0 - t*p) = c,
where t is an arbitrary integer.

n is the number of solution you want, n = 2 by default

Expand Down