NYOJ528 找球号(三)异或的运用

原题链接


#include <stdio.h>

int main(){
	int n, t, x;
	while(scanf("%d", &n) == 1){
		x = 0;
		while(n--){
			scanf("%d", &t);
			x ^= t;
		}
		printf("%d\n", x);
	}
	return 0;
}


posted on 2014-04-01 11:33  长木Qiu  阅读(114)  评论(0编辑  收藏  举报