Compute the moving average of vector Z over a sliding window of size n. Return a vector of length len(Z) - n + 1.
Z
n
len(Z) - n + 1
solve(...)