#K83272. Largest Square Board

    ID: 36161 Type: Default 1000ms 256MiB

Largest Square Board

Largest Square Board

You are given a number of test cases. In each test case, you are provided with a single integer S representing the total number of square tiles available. Your task is to determine the largest possible side length L of a square board that can be built using these tiles. The board must be a perfect square, which means the total number of tiles used is L² and it must not exceed S. Mathematically, the largest possible side is given by ( L = \lfloor \sqrt{S} \rfloor ).

inputFormat

The input is read from standard input (stdin). The first line contains an integer T (1 ≤ T ≤ 10^5), representing the number of test cases. Each of the following T lines contains a single integer S (1 ≤ S ≤ 10^9), which represents the number of square tiles available for that test case.

outputFormat

For each test case, output the largest possible side length L of the square board on a new line. The output is written to standard output (stdout).## sample

4
100
82
3
121
10

9 1 11

</p>