Here is the link of the problem

and here is my code,

`#understand`
int main ()
{
int i, j, k, t, n, c = 0;
int num[105]= {0};
num[0]= 0;
scanf ("% d", & t);
for (j = 1; j <= 45360; j ++)
{
c = 0;
for (k = 1; k <= j; k ++)
{
if (j% k == 0)
{
c ++;
}
}
if (num[c]== 0)
{
num[c]= j;
}
}
for (i = 0; i <t; i ++)
{
scanf ("% d", & n);
printf ("% d n", num[n])
}
returns 0;
}

The code gives me TLE (time limit exceeded). Is there a better algorithm or procedure to solve this problem? Or, is there a theory of numbers that I can apply to solve it? I think my procedure is not correct, although it gives me a TLE.