# 输入n个数从小到大依次存储到列表nums中,代码略
k = -1
for i in range(n):
if nums[i] < 0:
k = i
else:
break
ans = []
i, j = k, k + 1
while i >= 0 or j < n:
if i < 0:
ans.append()
j += 1
elif j==n:
ans.append(nums[i] * nums[i])
elif :
ans.append(nums[i] * nums[i])
i -= 1
else:
ans.append(nums[j] * nums[j])
j += 1
print(ans)