Convert to permutation#11593

Convert to permutation

1 second
128 megabytes
Easy

You are given an array of size . In one operation, you can choose an index i~(1 \le i \le n) and increase A_i by .

Find the minimum number of operations required to convert the array into a permutation of size . If it is impossible to do so, print .

Note that a permutation of size contains each element from to exactly once.

Input

The first line contains a single integer , denoting the number of test cases.

Each test case consists of multiple lines. The first line of each test case contains the integer n~(1 \le n \le 1000) — the size of the array. The next line contains integers, the elements of the array A~(0 \le A_i \le 1000).

Output

For each test case, output on a new line, the minimum number of operations required to convert the array into a permutation of size .

If it is impossible to do so, print .

Examples

Example 1

Loading
Loading