What is problem in this code

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define INF 50000000000009999ll
using ld = long double;
using ull = unsigned long long;
int main()
{
vector arr;
arr.push_back(1);
for(int i=2;i<=1000000;i++)
{
if(i%2==0 || i%3==0 || i%5==0)
arr.push_back(i);
}

int t;
cin>>t;
while(t--)
{
	int n;
	cin>>n;
	cout<<arr[n-1]<<"\n";
}
return 0;

}

@sachinkumar24051999 your code accepts any number that is divisible by either 2,3 or 5 but we need numbers that are ONLY divisible by 2,3 or 5. For eg 34 also gets accepted but it should not be.

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.