// hdoj_2095 find your present (2)
// 562MS 220K 230 B GCC
#include <stdio.h>
int main(void)
{
int i, n, x, s;
while(scanf("%d", &n), n)
{
s = 0;
for(i = 0; i < n; i ++)
{
scanf("%d", &x);
s ^= x;
}
printf("%d\n", s);
}
return 0;
}
while(scanf("%d", &n), n) 用到了逗号表达式
s ^= x; 用到了异或运算
百度百科:http://baike.baidu.com/view/674171.htm
1^1 = 0
1^0 = 1
0^1 = 1
0^0 = 0