N an integer, work out any sum is equal to the num
2016-08-23
0 0 0
no vote
Other
Earn points
Application background
Example: n = 19
19 of integers that is: 1-19
Each number can only appear once in the same formula;
Such as:
1+19
1+2+17
1+2+3+14
1+2+3+4+10
.....
Key Technology
{Num is a natural number and less than n} (0 is not a natural number in a set)And find out how to add all 2 is equal to n
For example n=19 19=1+18 19=2+17.....19=9+10 two numbers equal to 19 only 19/2
Thus three numbers only 19/3
Then split two-one of the decomposition is three-digit
First 18-1 not because 1 is already so try 2 get the 19=1+16+2
And until you find 6 consisting of three numbers
Then continue to find four
c++
个数
多少
可能
整数
出任
相加
等于
Related Source Codes
Local Path Planning Algorithm - DWA Algorithm
0
0
no vote
enDAQ-Shock-Data-Share-SRS-Blog
0
0
no vote
Calling chatGPT in a Windows application
0
0
no vote
Test Hello world
0
0
no vote
RCS calculation by one-way ray tracing
0
0
no vote
No comment