

It is guaranteed that there is at least one such integer under given constraints.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The first and only line of each test case contains a positive integer ‘N’.
For each test case, print a single line consisting of space-separated integers between 1 and ‘n’ (both inclusive) in increasing order that has exactly 3 divisors.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 50
4 <= N <= 10^9
Time Limit: 1 sec
We can show that only the square of prime numbers has exactly 3 divisors. This reduces our task to find all the prime numbers between 1 and sqrt(n). We will then print the square of these prime numbers. This can be done by using the Sieve of Eratosthenes as follows.
Pair Product Div by K
Pair Product Div by K
Merge Two Sorted Arrays Without Extra Space
Merge Two Sorted Arrays Without Extra Space
Co-Prime
First Digit One
Special Digit Numbers