Question link: https://www.hackerrank.com/challenges/leonardo-and-prime/problem

It is throwing run time error for testcase 11 ,16 and 17;

Otherwise its run fine .

Please help me why it is throwing runtime error?

Below is my code

```
#include <bits/stdc++.h>
#define ll long long int
#define MAX 50
int prime[MAX];
#include<vector>
using namespace std;
vector<ll> allp;
vector<ll> qa;
void findprime()
{
for(ll i=0;i<MAX;i++)
prime[i]=1;
prime[0]=0;
prime[1]=0;
for(ll i=2;i<MAX;i++)
{
if(prime[i]==0)
continue;
for(ll j=i*i;j<MAX;j+=i)
prime[j]=0;
}
for(ll i=0;i<MAX;i++)
{
if(prime[i]==1)
allp.push_back(i);
}
}
/*
* Complete the primeCount function below.
*/
int primeCount(long n) {
ll ans=0;
ll k=0;
ll x=1;
while(n/allp[k]>0)
{
n/=allp[k++];
ans++;
}
return ans;
}
int main()
{
ofstream fout(getenv("OUTPUT_PATH"));
findprime();
int q;
cin >> q;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
for (int q_itr = 0; q_itr < q; q_itr++) {
long n;
cin >> n;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
int result = primeCount(n);
fout << result << "\n";
}
fout.close();
return 0;
}
```