def test_alg_euclides(self, a, b):
x, y, d = alg_euclides(a, b)
assert x * a + y * b == d
assert d == gcd(a, b)
if (a // b) * b != a and (b // a) * a != b: # a no divide a b y viceversa
assert x < b // d
assert y < a // d
评论列表
文章目录