Application Programming Interface

The arithmetic module.

gcd(a: int, b: int) int

Compute the greatest common divisor of two numbers.

Parameters:
  • a (int) – The first number

  • b (int) – The second number

Returns:

The greatest common divisor.

Return type:

int

lcm(a: int, b: int) int

Compute the least common multiple of two numbers.

Parameters:
  • a (int) – The first number

  • b (int) – The second number

Returns:

The least common multiple.

Return type:

int