fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main () {
  4. int n;
  5. long long res, x;
  6. cin >> n;
  7. cin >> x;
  8. res = x;
  9. for (int i = 1; i <= n; i++) {
  10. cin >> x;
  11. res = __gcd(x,res);
  12. }
  13. cout << res;
  14. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
23313173781280