Recursive_integer_division
递归法求解整数划分。
整数划分,是指把一个正整数n写成如下形式:
n=m1+m2+…+mi (其中mi为正整数,并且1 <= mi <= n),则{m1,m2,...,mi}为n的一个划分。
如果{m1,m2,...,mi}中的最大值不超过m,即max(m1,m2,...,mi)<=m,则称它属于n的一个m划分。这里我们记n的m划分的个数为f(n,m) (Recursive method integer division. Integer division, refers to a positive integer n written as follows: n = m1+m2+ ...+mi (where mi is a positive integer, and 1 < = mi < = n), then {m1, m2, ..., mi} is a division of n. If {m1, m2, ..., mi} does not exceed the maximum value of m, i.e., max (m1, m2, ..., mi) < = m, m n is said that it belongs to a division. Where m is the number of division n our mind is f (n, m) )
- 2014-02-06 14:21:38下载
- 积分:1