Greatest common divisor 2

The greatest common divisor of two numbers x and y is the largest number that both x and y are divisible by that number. The greatest common divisor for several numbers is the largest number that all of those numbers are divisible by.
Implement a function gcd(*numbers) that would return the greatest common divisor of all the numbers passed to it.
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue