PAT 划拳
作者:互联网
划拳
#include <stdio.h>
int main()
{
int jhan,jhua,yhan,yhua,N,cntj = 0,cnty = 0;
scanf("%d",&N);
int i;
for(i = 0;i<N;i++)
{
scanf("%d%d%d%d",&jhan,&jhua,&yhan,&yhua);
if(jhan+yhan == jhua && jhan+yhan == yhua)
{
continue;
}
else if(jhan+yhan == jhua)
{
cnty++;
}
else if(jhan+yhan == yhua)
{
cntj++;
}
}
printf("%d %d",cntj,cnty);
return 0;
}
标签:jhua,jhan,PAT,划拳,int,d%,yhua,yhan 来源: https://blog.csdn.net/weixin_53272394/article/details/120398830