Codeforces Round 992 (Div. 2) |
---|
Finished |
You have an array of zeros $$$a_1, a_2, \ldots, a_n$$$ of length $$$n$$$.
You can perform two types of operations on it:
What is the minimum number of operations of the first type needed to make all elements of the array equal to one?
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.
The only line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 10^5$$$) — the length of the array.
Note that there is no limit on the sum of $$$n$$$ over all test cases.
For each test case, print one integer — the minimum number of needed operations of first type.
412420
1 2 2 4
In the first test case, you can perform an operation of the $$$1$$$st type with $$$i = 1$$$.
In the second test case, you can perform the following sequence of operations:
In the third test case, you can perform the following sequence of operations:
Name |
---|