Prime Query Problem Doubt

Can someone tell me what is wrong in my approach. I have properly checked for all the conditions still it is not getting accepted.

Problem: Prime Query
Submissions : CodeChef: Practical coding for everyone

#include<bits/stdc++.h>
using namespace std;
int mycode(int arr,int n){

}
int correctcode(int arr,int n){

}
int main(){
srand(time(NULL));
int t=(rand()%100000)+1;
for(int i=0;i<t;i++){
int n=(rand()%1e5)+1,q=(rand()%1e5)+1;
int correctoutput=correctcode(arr,n);
int myoutput=mycode(arr,n);
if(correctoutput!=myoutput){

    }
}

}
You can use this to generate the testcase at which your code is failing. I have added n and q. You can add the remaining elements of the array and queries.