Mojo function
gcd
gcd(m: Int, n: Int, /) -> Int
Compute the greatest common divisor of two integers.
Args:
Returns:
Int
: The greatest common divisor of the two integers.
gcd(s: Span[Int, origin], /) -> Int
Computes the greatest common divisor of a span of integers.
Args:
- s (
Span
): A span containing a collection of integers.
Returns:
Int
: The greatest common divisor of all the integers in the span.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!