Peter and the number
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Written on the blackboard N of natural numbers. Peter chooses two random of them and if they are identical, one of them washes, but if they are different, write their difference rather than a larger one. In the end, the board remains one number. What numbers could get Pete after all deletions?
Input
The first line contains an integer N (N ≤ 10^5). he second line contains N integers, separated by a space. All numbers in the input file is guaranteed to fit the type Longint.
Output
All of the possible numbers that can get Peter, with a space.
Examples
Input #1
Answer #1
Submissions 280
Acceptance rate 25%