for i,j in enumerate(x):
step = 1
amount = step*(min(int(j),int(x[step+i])))
step = step+1
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.