Time limit 1000/1000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
Given N positive integers. Write a program that computes the GCD (greatest common divisor) of these numbers.
Input
There is one number N on the first line (0 < n < 1001). On the second line there are N positive integers not bigger than 2*109.
Output
Write the GCD of given numbers .
Example
| stdin |
stdout |
5
125 80 67835 1000 90230
|
5 |
Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.
|