62,046
社区成员
发帖
与我相关
我的任务
分享
string CharList = "a,b,c,d,e,f";
string[] SpList = CharList.Split(',');
//int[] arr = new int[6];
//for (int i = 0; i < SpList.Length; i++)
//{
// SpList[i] = i + 1;
//}
//求排列
List<string[]> lst_Permutation = Algorithms.PermutationAndCombination<string>.GetPermutation(SpList, 6);
string totalStr="";
int totalcount=0;
foreach (var r in lst_Permutation)
{
foreach (var a in r)
{
totalStr += a + "";
}
totalStr += ",";
totalcount++;
}
MessageBox.Show(totalStr + "|" + totalcount);
720个 一个不少 哈哈我响了一晚上