Alex goes shopping

what is wrong with my code.One of the testcase is failing.
#include
using namespace std;
int main(){
int arr[10],n,t,a,b,cnt=0;
cin>>n;
for(int i=0;i<n;i++){
cin>>arr[i];
}
cin>>t;
while(t–){
cin>>a>>b;
for(int i=0;i<n;i++){
if(a%arr[i]==0){
cnt++;
}
}
if(cnt==b){
cout<<“Yes”;
}
else{
cout<<“No”;
}

}

}

Hi… pls save ur code on ide and send link…

Hi Deepali,
if u still have any doubt u can refer my code https://ide.codingblocks.com/s/631063

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.