#include<bits/stdc++.h>
using namespace std;
const int N=1e6;
int a[N+10];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n,i,j,k;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>j;
a[j]++;
}
for(j=N;j;j--)
{
int flag=0;
for(i=j;i<=N;i+=j)
{
flag+=a[i];
if(flag>=2)
{
cout<<j<<endl;
return 0;
}
}
}
}
调和级数。
最新推荐文章于 2024-07-08 21:23:20 发布