You are here : python_3mathmathgcd

math.gcd() - math

Return the greatest common divisor of the integers a and b.  If either
a or b is nonzero, then the value of gcd(a, b) is the largest
positive integer that divides both a and b.  gcd(0, 0) returns
0.


Syntax

math.gcd(a, b)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference