剑指offer python版 构建乘积数组
def aa(A): n=len(A) B=[1 for i in range(n)] for i in range(n): for j in range(n): if i !=j: B[i] *=A[j] return B print(aa([1,2,3]))
def aa(A): n=len(A) B=[1 for i in range(n)] for i in range(n): for j in range(n): if i !=j: B[i] *=A[j] return B print(aa([1,2,3]))