409807: GYM103785 B Poku's Vacation

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Poku's Vacationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

After a gruelling semester, Poku returned to his hometown for the summer break. He wanted to spend his vacations productively, so he started applying around for internships. But alas! – he had very few options for internships in the small town of Jalna. So, he was accepted into a construction company as a brick-layer.

His first project was to construct a "staircase". A staircase consists of steps each having a height strictly greater than the previous step (the first step can be of any height). Poku has $$$N$$$ equally sized bricks, and he wants to construct a staircase with maximum number of steps to impress his mentor. He doesn't necessarily have to use all the bricks.

Help Poku calculate the maximum number of steps.

Input

The first line of input consists of a single integer, $$$T$$$ $$$(1 \leq T \leq 10)$$$, which is the number of test cases.

The next $$$T$$$ lines of input, the $$$i^{th}$$$ of which consists of a single integer, $$$N$$$ $$$(1 \leq N \leq 10^6)$$$, which is the number of bricks that Poku would have in the $$$i^{th}$$$ case.

Output

Print $$$T$$$ lines, the $$$i^{th}$$$ line consisting of a single integer – the maximum number of steps that Poku could construct in the $$$i^{th}$$$ case.

ExampleInput
3
1
4
6
Output
1
2
3

加入题单

算法标签: