All submissions for this problem are available.### Read problems statements in [Hindi](http://www.codechef.com/download/translated/COOK108/hindi/TWOVRIBL.pdf), [Mandarin Chinese](http://www.codechef.com/download/translated/COOK108/mandarin/TWOVRIBL.pdf), [Russian](http://www.codechef.com/download/translated/COOK108/russian/TWOVRIBL.pdf), [Vietnamese](http://www.codechef.com/download/translated/COOK108/vietnamese/TWOVRIBL.pdf), and [Bengali](http://www.codechef.com/download/translated/COOK108/bengali/TWOVRIBL.pdf) as well. Chef played an interesting game yesterday. This game is played with two variables $X$ and $Y$; initially, $X = Y = 0$. Chef may make an arbitrary number of moves (including zero). In each move, he must perform the following process: - Choose any positive integer $P$ such that $P \cdot P \gt Y$. - Change $X$ to $P$. - Add $P \cdot P$ to $Y$. Unfortunately, Chef has a bad memory and he has forgotten the moves he made. He only remembers the value of $X$ after the game finished; let's denote it by $X_f$. Can you tell him the maximum possible number of moves he could have made in the game? ### Input - The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows. - The first and only line of each test case contains a single integer $X_f$. ### Output For each test case, print a single line containing one integer — the maximum number of moves Chef could have made. ### Constraints - $1 \le T \le 10^5$ - $1 \le X_f \le 10^9$ ### Example Input ``` 3 3 8 9 ``` ### Example Output ``` 3 5 6 ``` ### Explanation **Example case 2:** One possible sequence of values of $X$ is $0 \rightarrow 1 \rightarrow 2 \rightarrow 3 \rightarrow 5 \rightarrow 8$.
|Tags||binary-search, bruteforce, cook108, imanik, precomputation, taran_1407|
|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, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions