思路:i不为0的情况下,B[i]的值等于A[0]A[1]...A[i-1]A[i+1]...A[n-1],也就是说,除了A[i]之外,剩下的A数组中的数都连续相乘。因此考虑将整个相乘阶段分为i以前和i以后,使用两个for循环做连续相乘,最后得到结果。 public class Solution { public int[] multiply(int[] A) { if(A == null || A.length == 0) return null; int[] B = new int[A.length]; int cur = 0; //B...