Advertisement
Saleh127

at 105B

Oct 12th, 2020
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. ll a[100005],c,d=0,i;
  11. cin>>c;
  12. for(i=0;i<c;i++)
  13. {
  14. cin>>a[i];
  15. d=__gcd(d,a[i]);
  16. }
  17. cout<<d<<endl;
  18.  
  19. return 0;
  20. }
  21.  
Advertisement
RAW Paste Data Copied
Advertisement