Ask a question, as follows: A number of Y can be divided into certain number in the list, make some number in the list, and some number is equal to the sum of Y Example: List: 2000300 0400 0800 0200 00400 00600 00 Y=20000, Y in the list, if divided into ten digits of a maximum number of 4 results can be as follows: 4000800 {0800} {20000} Y=20000, Y in the list, if divided into the maximum number of ten number is set to 5, the results can be as follows: {2000200 0400 0400 0800 0} {0800} 4000800 {20000} Y=40000, Y in the list, if divided into the maximum number of ten number is set to 5, the results can be as follows: {4000400, 0800, 0400, 0200 00} {00 2000200 0800 0800 0200} {40000} {20000200} Multiple results, returns a random can
CodePudding user response:
The simplest algorithm: the number/10 *, output & lt; Of the part and the rest, such as: 20000/10=2000200 0200, 0140, 00; 40000/10=4000400, 0400, 0400, 0240 00;