Maximum Height Tree
Submissions: 696   Accuracy:

39.17%

  Difficulty: Easy   Marks: 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

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: RIYA BHARDWAJ
Author: Riya Bhardwaj


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.