t=int(input()) for _ in range(t): n=int(input()) a=list(map(int,input().split())) ok=10**9 ng=-1 while ok-ng>1: m=(ok+ng)//2 b=[a[i]+(i+1)*m for i in range(n)] if all(b[i]