Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

Nuen9 amornsak.nak at gmail.com
Mon Oct 10 12:23:04 EDT 2016


เมื่อ วันจันทร์ที่ 10 ตุลาคม ค.ศ. 2016 22 นาฬิกา 46 นาที 33 วินาที UTC+7, K. Elo เขียนว่า:
> Hi!
> 
> Could it be, "Nuen9", that you would like to find a split where the 
> split sums are close to each other? In other words, you define the 
> number of splits (in your example: 3) and the algortihm should test all 
> possible combinations and select the split where the sum differences are 
> smallest.
> 
> Best,
> Kimmo
> 
> 10.10.2016, 18:20, Nuen9 wrote:
> > เมื่อ วันจันทร์ที่ 10 ตุลาคม ค.ศ. 2016 21 นาฬิกา 31 นาที 25 วินาที UTC+7, Steve D'Aprano เขียนว่า:
> >> On Tue, 11 Oct 2016 12:38 am, amornsak.nak at gmail.com wrote:
> > I'm sorry for my English language.
> >
> > OK, I have list = [10,20,30,40,110,50,18,32,5] and want to find three values of summation from my list by split any way list but three values of summation has closely
> > example.
> > [10,20,30], [40,110,50], [18,32,5] = 60, 200, 55 -> it is not closely
> > *** 60 = 10+20+30, 200 = 40+110+50, 18+32+5 = 55
> > and [10], [20,30,40,110,50,18], [32,5]  = 10, 268, 37 -> and it is not closely
> > and [10,20,30,40],[110],[50,18,32,5] = 100,110,105 -> it's closely
> >
> > The Really answers that I want is [10,20,30,40],[110],[50,18,32,5] = 100,110,105 from list[10,20,30,40,110,50,18,32,5]
> >
> > And I don't know what I have to explain for my questions in English because My English so bad T_T
> >
> > Thank you for reading my text
> >
> > (;
> >

Yes it is, I want example python code for finding my answers but I don't code my answers. please help me.



More information about the Python-list mailing list