The program output is correct but the test cases are coming wrong.
#include
using namespace std;
int main() {
int n1,n2;
cin>>n1;
cin>>n2;
if(n1>0 && n1<100) {
}
else {
return 0;
}
if(n2>0 && n2<100) {
}
else {
return 0;
}
int a;
for(int i=1; i<=n1;i++) {
a=3*i+2;
if(a%n2 != 0) {
cout<<a<<endl;
}
}
return 0;
}