#include #define ll long long using namespace std; int T,n,a[100005]; ll ans; int read(){ int x=0;char ch=getchar(); while(!isdigit(ch)) ch=getchar(); while(isdigit(ch)) x=(x<<3)+(x<<1)+(ch^48),ch=getchar(); return x; } void print(ll x){ if(x>=10) print(x/10); putchar(x%10+'0'); } int main(){ T=read(); while(T--){ n=read(); for(int i=1;i<=n;i++) a[i]=read(); sort(a+1,a+n+1); ans=0; for(int i=1;i