You are given an array $$$a_1, a_2, \ldots, a_n$$$ of positive integers.
You can perform the following operation any number of times:
Find the minimum number of operations needed to make every element of the array equal to $$$1$$$.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.
The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 3 \cdot 10^5$$$) — the length of the array.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^9$$$) — the elements of the array.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$3 \cdot 10^5$$$.
For each test case, output a single integer — the minimum number of operations needed to make all elements equal to $$$1$$$.
271 1 3 1 2 2 111
20
In the first test case,
So you can make all elements equal to $$$1$$$ in $$$2$$$ operations.