import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner obj = new Scanner(System.in);
int t=obj.nextInt();
while(t>0)
{
int n=obj.nextInt();
int a=check(n);
System.out.println(a);
tβ;
}
}
public static int check(int n)
{
ArrayList list=new ArrayList<>();
list.add(0);
list.add(1);
int j=2;
for(int i=2; i<=n; i++)
{
if(i%2==0||i%3==0||i%5==0)
{
list.add(i);
j++;
}
else
{
n++;
}
}
return list.get(j-1);
}
}
hii sir can you check this code because itβs not passing test cases