# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Amin and Belal are two friends. Both have good knowledge about graph and tree in data structure part. Now they discuss about some problems of Codeforces which are related to these topics. Amin now figure out a binary tree which are consists of some nodes and edges. A binary tree is a tree in which each node has at most two children, which are referred to as the left child and the right child. The following figure contains a binary tree.

Without fill up one level it can not go another level of the tree and node number is sequentially such as a figure.Now Amin asked Belal the minimum level of a node. Belal asked your help and I think you are a good programmer.So please help Belal and build the tree efficiently to get minimum level of a node.

INPUT:

Input starts with an integer T (1<=T<=100000)-no of test cases and for each cases an integer number N(1<=N<=100000)-denoting the numbre of nodes.

OUTPUT:

Output the minimum level no of the node of the binary tree.!

Input | Output |
---|---|

2 1 3 | Case 1: 1 Case 2: 2 |

94% Solution Ratio

Cloud_Earliest,

yeahmymanFastest, 0.0s

Big_PappaLightest, 1.6 MB

mdgaziur001Shortest, 100B

Login to submit