change the code to this still getting error
#include
#include
using namespace std;
typedef long long ll;
int main()
{
ll a[7368787];
ll res[7368787];
ll n;
int i=1;
cin>>n;
memset(a,1,sizeof(a));
for(ll p=2;pp<=7368787;p++){
if(a[p]==1){
for(ll i=pp;p<7368787;i+=p){
a[p]=0;
}
}
} for(ll p=2;p<7368787;p++)
if(a[p]==1)
{
res[i]=p;
i++;
}
cout<<res[n];
return 0;
}