Bruno the Lazy Dog
Chef has a dog name Bruno. He's very happy and well-behaved dog but he's very lazy.So one day chef decided to put him on a action test for 60 days. On day 1 the chef keeps a quota of 1 biscuits, each day the quota will be doubled. If Bruno is active on ith day he will be given all the biscuits in the quota that day, otherwise, he is given zero biscuits. Find the total number of days Bruno was active when the total number of Biscuits he ate are given.
The first line of the input contains an integer T denoting the number of test cases. For each test case, there is a Integer N denotes the total number of biscuits Bruno ate.
For each test case, output a single line containing the number of days Bruno was active.(An answer always exists.)
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 105
Input: 2 1 10 Output: 1 2
Test case 1: Bruno ate 1 biscuit. On the first day, he had a quota of 1 biscuit. So, he was only active for 1 day.
Test case 2: Bruno ate 10 biscuits. According to the quota, on the 2nd day Bruno should have 2 biscuits and on the 4th day 8 biscuits, so in total it becomes 10 biscuits. So Bruno was active for 2 days.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions