For this Question: Given an integer array A of size N initially. We take the GCD of all adjacent elements. Now we obtain N-1 integers. Take this array as new array A. Keep repeating this process until you obtain an array of only 1 element. Find that last element that you get.

See explanation of example section for more clarity.First line contains an integers N.
Next line contains N space separated integers denoting elements of array.

Constraints
1 <= N <= 10^5
0 <= Ai<= 10^9Print the last element remaining.Sample Input 1:
3
1 2 3

Output 
1

Explanation:
Array ={1, 2, 3}
Taking GCD of adjacent elements, Array ={1, 1}
Taking GCD of adjacent elements, Array ={1}
Now we stop as only one element is left. 

Sample Input 2:
6
3 6 6 9 3 3

Output 
3

Explanation
Array ={3, 6, 6, 9, 3, 3}
Taking GCD of adjacent elements, Array ={3, 6, 3, 3, 3}
Taking GCD of adjacent elements, Array ={3, 3, 3, 3}
Taking GCD of adjacent elements, Array ={3, 3, 3}
Taking GCD of adjacent elements, Array ={3, 3}
Taking GCD of adjacent elements, Array ={3}
Now we stop as only one element is left., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
#define endl            "\n"
#define ll				long long int
#define f(n) 			for(int i=0;i<n;i++)
#define fo(n)			for(int j=0;j<n;j++)
#define foo(n)			for(int i=1;i<=n;i++)
#define ff 				first
#define ss 				second
#define pb 				push_back
#define pii 			pair<int,int>
#define vi 				vector<int>
#define vp 				vector<pii>
#define test            int tt; cin>>tt; while(tt--)
#define mod 			1000000007
void fastio()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("Input 1.txt", "r", stdin);
	freopen("Output 1.txt", "w", stdout);
#endif
}

int main() {
	fastio();
	int n;
	cin >> n;
	int a[n];
	f(n)cin >> a[i];
	int ans = 0;
	f(n) {
		ans = __gcd(ans, a[i]);
	}
	cout << ans << endl;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?