Just like pickle
시간 제한1초메모리 제한1024 MB
목표 좌표 x가 주어질 때, 0에서 시작해 길이 2^k인 점프(방향은 자유)만으로 도달하는 최소 횟수를 구한다.
문제
Grasshopper is standing on a line at a point with coordinate . In one turn it can choose any non-negative integer number and jump to the left or to the right to the distance .
Help it to find out what is the minimum number of turns it has to do in order to move from the point with coordinate to the point with coordinate .
입력
The first line contains a single integer --- a number of test cases ().
Each test case consists of a single line, that contains a single integer --- coordinate of a target point for the grasshopper ().
출력
For each test case output a single integer --- the minimum number of turns that the grasshopper has to do.