mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
pre-commit autoupdate 2025-09-11 (#12963)
* pre-commit autoupdate 2025-09-11 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -65,7 +65,7 @@ def invert_modulo(a: int, n: int) -> int:
|
||||
1
|
||||
|
||||
"""
|
||||
(b, x) = extended_euclid(a, n)
|
||||
(b, _x) = extended_euclid(a, n)
|
||||
if b < 0:
|
||||
b = (b % n + n) % n
|
||||
return b
|
||||
|
||||
@@ -31,7 +31,7 @@ def modular_division(a: int, b: int, n: int) -> int:
|
||||
assert n > 1
|
||||
assert a > 0
|
||||
assert greatest_common_divisor(a, n) == 1
|
||||
(d, t, s) = extended_gcd(n, a) # Implemented below
|
||||
(_d, _t, s) = extended_gcd(n, a) # Implemented below
|
||||
x = (b * s) % n
|
||||
return x
|
||||
|
||||
@@ -47,7 +47,7 @@ def invert_modulo(a: int, n: int) -> int:
|
||||
1
|
||||
|
||||
"""
|
||||
(b, x) = extended_euclid(a, n) # Implemented below
|
||||
(b, _x) = extended_euclid(a, n) # Implemented below
|
||||
if b < 0:
|
||||
b = (b % n + n) % n
|
||||
return b
|
||||
|
||||
Reference in New Issue
Block a user