Python3 代码
def printN (num, size):
for i in range (size):
print (num[i], end = " ")
n, size = input().split()
n = int(n)
size = int(size)
l = input().split()
num = [0] * n
for i in range (len(l)):
num [i] = int(l[i])
printN (num, size)