10581058 SUSTech Online Judge
Problem 1058 --The height of a tree

1058: The height of a tree

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 414  Solved: 282
[Submit][Status][Web Board]

Description

Give you the number of nodes of a complete binary tree T. Please calculate the height of T.

Input

First line is an integer T, which is the number of test cases. (1 <= T <= 1024)

For each test case, there will be an integer in a single line N (1 <= N <= 1024). N is the number of nodes in the Tree.

Output

Print the height of the tree for each test case. 

Sample Input

2
3
5

Sample Output

1
2

HINT

Easy problem.

Source

[Submit][Status]