#K9921. Face Up Tiles

    ID: 39137 Type: Default 1000ms 256MiB

Face Up Tiles

Face Up Tiles

This problem is about determining how many tiles remain face up after a sequence of flipping operations. Initially, all tiles are face down. For each person, they flip the state of tiles that are multiples of their number (i.e., the i-th person flips every i-th tile). A tile will remain face up if and only if its position is a perfect square. This is because a perfect square has an odd number of divisors. Mathematically, the answer for a given number N is \(\lfloor \sqrt{N} \rfloor\).

You are given several test cases, each containing a single integer N. For each test case, output the number of tiles that remain face up.

inputFormat

The first line of input contains a single integer T representing the number of test cases. Each of the following T lines contains a single integer N, which denotes the number of tiles (and persons) involved in the game.

Input Format:

T
N1
N2
... 
NT

outputFormat

For each test case, output the number of tiles that remain face up after all operations. Each answer should be printed on a new line.

Output Format:

result1
result2
... 
resultT
## sample
3
3
6
10
1

2 3

</p>