public static void SortTest(int[] args, int argsum)//数组。和
{
Array.Sort(args);//升序
Array.Reverse(args);//取反变倒叙
List<int> List2 = new List<int>(args);//整型数组转list
for (int i = 0; i < List2.Count; i++)
{
List<int> List3 = new List<int>();
List3.Add(List2[i]);
List2.RemoveAt(i);
for (int j = 0; j < List2.Count; j++)
{
if ((int)List2[j] <= argsum - Count(List3) - 0.5)
{
List3.Add(List2[j]);
&nb
{
Array.Sort(args);//升序
Array.Reverse(args);//取反变倒叙
List<int> List2 = new List<int>(args);//整型数组转list
for (int i = 0; i < List2.Count; i++)
{
List<int> List3 = new List<int>();
List3.Add(List2[i]);
List2.RemoveAt(i);
for (int j = 0; j < List2.Count; j++)
{
if ((int)List2[j] <= argsum - Count(List3) - 0.5)
{
List3.Add(List2[j]);
&nb