Fix an odd integer n>1. For a permutation p of the set {1,2,...,n}, let S be the number of pairs of indices (i,j), 1≤i≤j≤n, for which pi+pi+1+...+pj is divisible by n. Determine the maximum possible value of S.Croatia combinatoricsdivisiblepermutation