一个数组里有n个整数。每次取出1至n个整数相加求和。
例如数组:arr[1,2,3,4];
sum0 = 1;
sum1 = 2;
sum2 = 3;
sum3 = 4;
sum4 = 1+2 = 3;
sum5 = 1+3 = 4;
sum6 = 1+4 = 5;
sum7 = 2+3 = 5;
sum8 = 2+4 = 6;
sum9 = 3+4 = 7;
sum10 = 1+2+3 = 6;
sum11 = 1+2+4 = 7;
sum12 = 1+3+4 = 8;
sum13 = 2+3+4 = 9;
sum14 = 1+2+3+4 = 10;
arr2[sum0,sum1,...,sum14];
求arr2;