ADV04J  Invisible point
Daniel marked a point on a plane with sympathetic ink and he has also drawn a regular ngon with normal ink. Max can see the ngon, but can't see the point. Max can draw a line and ask Daniel which side of the line the point is. What is the minimum number of questions Max have to ask to define if the point is inside the ngon in the worst case?
Input
First line of the input contains number t  the amount of test cases. Each test consists of the single integer n  the amount of sides of the ngon.
Constraints
1 <= t <= 100
3 <= n <= 1000000
Output
For each test case print a single number  the answer to the question in the statement.
Example
Input: 1 4 Output: 3
hide comments
mahabir10:
20200921 07:20:03
Extremely easy 

tarun_28:
20191209 11:25:23
watch out when n is odd.. 

mittalprateek:
20181016 21:02:36
just observe the pattern..simple maths only .. 

oneinchatatime:
20180718 14:29:05
very nice problem 

mag1x_:
20180530 18:25:40
my 50th simple maths :) 

Rakend Chauhan:
20170101 07:31:00
the question is DP XD 

ace_cocytus:
20161005 16:11:21
If Im not wrong, test case 4 (a rectangular); draw diagonally to find which side the point is. And then, we can draw the next 2 lines based on side the point is, to get the answer (the point inside the ngon or not). 

kataria:
20160731 09:22:21
nice prob. 

minhthai:
20160125 05:49:31
ask your friends: pen and paper :) 

anuveshkothari:
20150814 15:26:24
@rishabh comment helps in finding the approach of the problem 
Added by:  Spooky 
Date:  20101114 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Advancement Autumn 2010, http://sevolymp.uuuq.com/ 