LearnPy Hub
← Arena
EasyRating 900

GCD of Many

Print the greatest common divisor of all the numbers.

Input

n, then n positive integers on one line.

Output

The GCD.

Sample 1

Input
3
12 18 24
Output
6

Sample 2

Input
1
7
Output
7
solution.py
Output appears here
GCD of Many · Python Arena problem · LearnPy Hub