There is a task in Among Us in which $N$ temperature scale with unique readings are given and you have to make all of them equal. In one second you can choose an odd number and add or subtract that number in any one temperature value. Find minimum time (in seconds) required to complete the task.
$Note$: Equal value may or may not belong to array.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- First line of each testcase contains single integer $N$, the number of temperature scales
- Next line contain $A_i$ for $1 \leq i \leq N$, reading of temperature scales

-----Output:-----
For each testcase, output a single line the time (in seconds) required to complete the task.

-----Constraints-----
- $1 \leq T \leq 10^3$
- $1 \leq N \leq 10^3$
- $0 \leq A_i \leq 10^9$

-----Sample Input:-----
3

5

1 2 3 4 5

4

5 2 3 8

2

50 53  

-----Sample Output:-----
5

4

1 

-----EXPLANATION:-----
- In the $2^{nd}$ test case we need $2$ seconds to change $2$ to $8$ , $1$ second to change $3$ and $5$ to $8$ . So total time required is $2+1+1=4$ seconds.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'for _ in range(int(input())):\n n=int(input())\n a=list(map(int,input().split()))\n ev=[]\n od=[]\n\n for i in a:\n  if i%2==0:\n   ev.append(i)\n  else:\n   od.append(i)\n c=0\n c1=0\n cc=0\n cc1=0\n if od:\n  mo=max(od)\n  for i in a:\n   if i!=mo and i%2!=mo%2:\n    c+=1\n   elif i!=mo and i%2==mo%2:\n    c+=2\n  mo+=1\n  for i in a:\n   if i%2==mo%2:\n    cc+=2\n   else:\n    cc+=1\n  \n if ev:\n  me=max(ev)\n  for i in a:\n   if i!=me and i%2==me%2:\n    c1+=2\n   elif i!=me and i%2!=me%2:\n    c1+=1\n  me+=1 #odd now\n  for i in a:\n   if i%2==me%2:  #odd odd 2\n    cc1+=2\n   else:\n    cc1+=1 #odd even 1\n if ev and od:\n  print(min(c,c1,cc,cc1))\n elif not ev:\n  print(min(cc,c))\n elif not od:\n  print(min(cc1,c1))'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13629