#2
yanzhu63562019-05-06 17:17
|
如何让数组中的某些数字相加最接近指定的数值(比如:10)
数组如下:
7.73,7.73,7.73,7.73,6.51,4.07,8.1,5.21,4.47,4.45,4.47,5.23,10.47,1.33,1.33,1.33,1.33,1.33,1.33,1.33,1.33,1.33,2.14,2.14,2.14,9.74,2.91,2.35,9.49,5.79,9.65,3.74,3.74,3.74,3.74,3.74,1.21,1.21,1.21,1.21,1.21,1.21,1.21,1.21,2.36,2.36,2.36,2.36,4.51,6.66,4.73,9.4,8.55,3.54,10.79