📅  最后修改于: 2022-03-11 14:58:59.732000             🧑  作者: Mango
#include
#include
#include
using namespace std;
int main() {
int n;
cin >> n;
vector a(n);
for(int i = 0; i < n; ++i)
cin >> a[i];
int ans = a[0];
for(int i = 1; i < n; ++i)
ans = gcd(ans, a[i]);
cout << ans << endl;
return 0;
}