标签:
用异或看取得的值是否为0判断
思想换没搞懂
#include<stdio.h> int main() { int ans,n,a; while(scanf("%d",&n),n){ ans=0; while(n--){ scanf("%d",&a); ans=ans^a; } if(ans==0) printf("Grass Win!\n"); else printf("Rabbit Win!\n"); } return 0; }
标签:
原文地址:http://blog.csdn.net/a197p/article/details/46336141