\(gcd(a, b, c)=gcd(gcd(a, b), c)\)
\(gcd\)过去就可以了是吧但是
输出1居然一分也没有 惊了#includeusing namespace std;int N;int G=0;int gcd(int a, int b){ return (b==0)?a:gcd(b, a%b);}int main(){ cin >> N; for(int i=1, k;i<=N;++i){ cin >> k; G=gcd(G, k); } cout << G << endl; return 0;}