P17757 [HackerEarth] Pal loves coding. He solves problems daily on online judges and participates in college OPCs. He keeps track of time he spents on coding everyday.
普及-
题目描述

Pal loves coding. He solves problems daily on online judges and participates in college OPCs. He keeps track of time he spents on coding everyday.

But Pal is inconsistent. Some day he codes for 1000 units of time and other day he may code for 1 unit of time. Now inconsistency in Pal's case is defined as difference of coding times of any two days. Pal wishes to find his minimum inconsistency.

You will be given coding time of Pal for n days. You have to find minimum inconsistency.

Input:-

First line contains number of test cases t.Each test case begins with number of days n. The next line contains coding times for n days.

Output:-

Print minimum inconsistency per test case.

Constraints:-

t ≤ 20

n ≤ 1000000

coding time for each day ≤ 10000000

SAMPLE INPUT
2
5
2 8 5 9 11
4
3 12 8 5

SAMPLE OUTPUT
1
2

输入格式

见题面

输出格式

见题面

样例输入
7 3 1 111 1111 5 23 454 232323 4343443 696 6 1 11 2344 444 444 444 8 45 78 90 0 23232 34 234 567 10 11 22 33 44 55 66 77 79 85 96 4 120000 0 5000 100000 2 120000 1
样例输出
0 0 0 2394 0