def get_split_sum (num) :
Arr=[[[] for I in range (num + 1)] for j in range (num + 1)]
For j in range (num + 1) :
Arr [j] [j]=[" {} ". The format (j)]
The for m in range (1, num + 1) :
In the range for n (m - 1, 0, 1) :
Arr [m] [n]=[" + {} {} ". The format (n, xx) for xx in arr [m - n] [n]] + arr [m] [n + 1]
Return arr (num) [1]
TMP=get_split_sum (1000)
Print (TMP, len (TMP))
This code is the sum of 1000 the number of all cases
My this stupid computer can run to 97
Everyone is what circumstance
CodePudding user response:
70 already has 4087968 combinations, saved 35761339 elements80 already has 15796476 combinations, saved 144755665 elements
Geometric growth, I ran to 85 suggests that memory,