假设两个列表是a和b。我正在比较a [0]> b [0],count_alice将为1。然后需要将此int类型count_alice变量转换为List类型。我该如何解决?
static List<int> CompareTriplets(List<int> a, List<int> b)
{
int count_alice = 0;
int count_bob = 0;
for(int i = 0; i<a.Count; i++)
{
if(a[i]>b[i])
{
count_alice += 1;
}
else if (a[i]<b[i])
{
count_bob += 1;
}
}
return a;