1  static List<crads> shuen(List<crads> list) 
 2         {
 3             List<crads> cList = new List<crads>();
 4             for (int i = 0; i < list.Count;++i)
 5             {
 6                 int num = list[i].id;
 7                 cList.Add(list[i]);
 8                 for (int j = 0; j < list.Count;++j )
 9                 {
10                     if (list[j].id == num + 1)
11                     {
12                         num = list[j].id;
13                         cList.Add(list[j]);
14                     }
15                 }
16                 
17                 if (cList.Count >= 5)
18                 {
19 
20                     return cList;
21                 }
22                 else 
23                 {
24                     cList.Clear();
25                 }
26               
27             }
28            return null;
29              
30         }

 

相关文章:

  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2021-11-17
  • 2021-12-28
  • 2021-12-25
  • 2021-08-04
猜你喜欢
  • 2021-11-08
  • 2022-12-23
  • 2021-12-25
  • 2021-12-25
  • 2022-12-23
  • 2021-09-09
相关资源
相似解决方案