for t in range(int(input())): _ = int(input()) s = sum(list(map(int, input().split()))) ans, k = 0, 1 while k <= s: s -= k k += 1 ans += 1 print(ans)