让我们假设我们有贷款的用户名单已经象下面这样:
Let's assume that we have the list of loans user has like below:
loan1 loan2 loan3 ... loan10和我们具有可以接受的2至10贷款功能:
函数(贷款)
。
对于前,以下是可能的:
And we have the function which can accept from 2 to 10 loans:
function(loans)
.
For ex., the following is possible:
函数(loan1,loan2)
函数(loan1,loan3)
函数(loan1,loan4)
函数(loan1,loan2,loan3)
函数(loan1,loan2,loan4)
函数(loan1,loan2,loan3,loan4,loan5,loan6,loan7,loan8,loan9,loan10)
function(loan1, loan2)
function(loan1, loan3)
function(loan1, loan4)
function(loan1, loan2, loan3)
function(loan1, loan2, loan4)
function(loan1, loan2, loan3, loan4, loan5, loan6, loan7, loan8, loan9, loan10)
如何写code通过所有可能的组合,以该功能?
How to write the code to pass all possible combinations to that function?
在罗塞塔code 您已经实现产生的组合在许多语言中,选择你自己。
On RosettaCode you have implemented generating combinations in many languages, choose yourself.
上一篇:C ++比较数组的总和数组、总和
下一篇:算法与发现概率概率、算法、发现