# import the numpy library
import numpy as np

# create a numpy array of size 10 filled with ones
Z = np.ones(10)

# create a numpy array of size 20 with random integer values between 0 and 9
I = np.random.randint(0, len(Z), 20)

# set n to 1
n = 1

# add n to the values in Z at the indices specified in I
np.add.at(Z, I, n)

# print the resulting array Z
print(Z)