n = int(input())
data = list(map(int,input().split()))
price = []
for i in range(n):
if i == 0:
price.append((data[i]+data[i+1])//2)
continue
if i == n-1:
price.append((data[i-1]+data[i])//2)
continue
price.append((data[i-1]+data[i]+data[i+1])//3)
for i in range(n):
print(price[i],end=" ")
201809-2 买菜
n = int(input())
max_data = 0
time = []
for i in range(n*2):
data = list(map(int,input().split()))
data_1,data_2 = data[0],data[1]
if data_1 > max_data:
max_data = data_1
if data_2 > max_data:
max_data = data_2
time.append((data_1,data_2))
time_list = [0]*max_data
for i in time:
for j in range(i[0],i[1]):
time_list[j-1]+=1
print(time_list.count(2))
满分实现!