GCD of a list of integers: lgcd

### 5.5.2 GCD of a list of integers: lgcd

The lgcd command also finds the GCD of a list of integers or polynomials.

- lgcd takes one argument:
  L, a list of integers (or polynomials).
- lgcd(L) returns the GCD of all the integers (or polynomials) in the list L.

#### Example

Input:

lgcd([18,15,21,36])

Output:

3

Remark.
lgcd does not accept two lists as arguments (even if they have the same size).