Maximum Height Tree
Easy Accuracy: 41.34% Submissions: 973 Points: 2

You have been given N dots and a triangle is formed using these dots in the following way-
    .
   . .
  . . .
 . . . .

i.e,first line of triangle contains 1 dot,second line contains 2 dots,third line 3 dots and so on.
You have to find the minimum hieght H of the triangle that can be formed using these N dots.


Input:
The first line of input contains an integer denoting the number of test cases.Next line of input contains a positive number N denoting the number of dots.


Output:
For each test case , the output is in a new line containg an integer H denoting the max height of the triangle which can be formed.


Constraints:
1<=T<=100
1<=N<=10^5


Example:
Input:
1
10
Output:
4

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.