Given N number of square blocks. The height of each square block is 1. The task is to create a staircase of max height using these blocks.
Note: The first stair would require only one block, the second stair would require two blocks and so on.
The first line of the input contains T i.e number of test cases. Each line of the test case contains a number N i.e number of blocks.
Each new line of the output contains only one single integer i.e Maximum height of staircase.
Test Case 1: the max height of the staircase that can be made from 12 blocks is 4. (A staircase of height 4 means sequence of 1,2,3,4 blocks to create a valid staircase.)
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.