You are given an array of size
Find the minimum non negative number such that there exist an index and when you can replace by , the sum of elements of array from index to and to becomes equal, where . Assume array to be 1-indexed.
If there is no possible print in separate line.
Input Format
The first line contains , the number of test cases.
For each Test case :
The first line contains an integer , size of the array.
The second line contains space-separated integers, the of which is .
Input Constraints
Sum of N all over testcases doesn't not exceed .
Output Format
For each test case, print the required answer in separate line.
Add to the index(1-indexing).