# # 最大乘积 # @param A int整型一维数组 # @return long长整型 # class Solution: def solve(self , A ): # write code here A = sorted(A) max1 = A[-1]*A[-2]*A[-3] max2 = A[0]*A[1]*A[-1] return max(max1,max2) 两种情况: 三个最大的数都是正数 两个负数,一个正数