求助我RE P5682求助
#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 2;
int n;
int s[maxn];
int main(){
cin >> n;
for(int i = 1 ; i <= n ; i++)
cin >> s[i];
for(int i = 1 ; i <= n ; i++)
for(int j = 1 ; j <= n ; j++)
s[i] %= s[j];
sort(s + 1 , s + n + 1);
int m = unique(s + 1 , s + n + 1) - s;
cout << s[2];
return 0;
}