Given an array of n integers. We need to count all values of ‘k’ such that
arr % k = arr % k = ....... = arr[n-1] % k
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer n denoting the size of the array. The next line contains n space separated integers.
Print the count of values of k such that each element of array mod k is equal.
38 6 34
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.