hdu 1.2.4

采用异或...

 1 #include<stdio.h>
 2 int main()
 3 {
 4     //freopen("input.txt","r",stdin);
 5     int n,s,a;
 6     while(scanf("%d",&n),n)
 7     {
 8         s = 0;
 9         while(n--)
10         {
11             scanf("%d",&a);
12             s ^= a;
13         }
14         printf("%d
",s);
15     }
16 
17     return 0;
18 }
原文地址:https://www.cnblogs.com/imLPT/p/3675960.html