#include using namespace std; int gdd(int a, int b) { int m=a, n=b; if (m>n) { m = b; n = a; } while(m) { int tmp = n % m; n = m; m = tmp; } return n; } int main(int argc, char** argv) { int max = 100; int n; int ans[max]; cin >> n; for (int ii=0; ii> ans[ii]; } if (n==1) { cout << n << endl; return 0; } int mgdd=gdd(ans[0], ans[1]); if (n>=3) { for (int ii=2; ii