can you tell what is the problem in the code
#include
#include
using namespace std;
bool primesieve(long long int n)
{ if(n==1||n==0)
return false;
if(n==2)
return true;
if(n%2==0)
return false;
for(long long int i=3;i*i<=n;i+=2)
if(n%i==0)
return false;
return true;
}
int main()
{ string s;
int n;
cin>>n;
long int max=0;
cin>>s;
for(int i=0;i<s.length();i++) {
for(int j=i;j<s.length();j++){
string temp="";
for(int k=i;k<=j;k++)
temp+=s[k];
if(primesieve(stoi(temp)))
{
max++;
i=j;
break;
}
}
}
cout<<max;
}