不解释
#include<stdio.h>
int main()
{
int i,n,a[25],b[25],suma,sumb;
scanf("%d",&n);
while(n)
{
suma=sumb=0;
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
scanf("%d",&b[i]);
for(i=0;i<n;i++)
{
if(a[i]==2&&b[i]==1)
sumb+=6;
else if(a[i]==1&&b[i]==2)
suma+=6;
else if(a[i]>b[i]&&(a[i]-b[i]==1))
sumb+=a[i]+b[i];
else if(a[i]>b[i]&&(a[i]-b[i]>1))
suma+=a[i];
else if(a[i]<b[i]&&(b[i]-a[i]==1))
suma+=a[i]+b[i];
else if(a[i]<b[i]&&(b[i]-a[i]>1))
sumb+=b[i];
}
printf("A has %d points. B has %d points.\n",suma,sumb);
scanf("%d",&n);
if(n) printf("\n");
}
return 0;
}