Compute the moving average of vector Z over a sliding window of size n. Return a vector of length len(Z) - n + 1, where element i is the mean of Z[i:i+n].
Z
n
len(Z) - n + 1
i
Z[i:i+n]
solve(...)