Problem Description

In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your present's
card number will be the one that different from all the others.For example, there are 5 present, and their card numbers are 1, 2, 3, 2, 1.so your present will be the one with the card number of 3, because 3 is the number that different from all the others.

Input

The input file will consist of several cases.

Each case will be presented by an integer n (1<=n<=200, and n is odd) at first. Following that, n positive integers will be given in a line. These numbers indicate the card numbers of the presents.n = 0 ends the input.

Output

For each case, output an integer in a line, which is the card number of your present.

Sample Input

5
1 1 3 2 2
3
1 2 1
0

Sample Output

3
2
#include<stdio.h>
int main()
{
int T;
int n,m;
while(~scanf("%d",&T),T){
scanf("%d",&n); while(--T){
scanf("%d",&m);
n=m^n;
}
printf("%d\n",n);
} return 0;
}

HDoj-2095-与众不同的更多相关文章

  1. find your present (2) hdoj 2095

    /* author:谦智 find your present (2) hdoj 2095 法一:用暴力 法二:用map 法三: 符号是^. 异或是个位运算符号,具体是怎么操作的请百度,这里有个特性使得 ...

  2. HDOJ 2095

    find your present (2) Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/1024 K (Java/Oth ...

  3. HDOJ 1009. Fat Mouse' Trade 贪心 结构体排序

    FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  4. HDOJ 2317. Nasty Hacks 模拟水题

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  5. HDOJ 1326. Box of Bricks 纯水题

    Box of Bricks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) To ...

  6. .NET程序员细数Oracle与众不同的那些奇葩点

    扯淡 距上次接触 Oracle 数据库已经是 N 年前的事了,Oracle 的工作方式以及某些点很特别,那会就感觉,这货就是一个奇葩!最近重拾记忆,一直在折腾 Oracle,因为 Oracle 与众不 ...

  7. HDOJ 1004 Let the Balloon Rise

    Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...

  8. hdoj 1385Minimum Transport Cost

    卧槽....最近刷的cf上有最短路,本来想拿这题复习一下.... 题意就是在输出最短路的情况下,经过每个节点会增加税收,另外要字典序输出,注意a到b和b到a的权值不同 然后就是处理字典序的问题,当松弛 ...

  9. HDOJ(2056)&HDOJ(1086)

    Rectangles    HDOJ(2056) http://acm.hdu.edu.cn/showproblem.php?pid=2056 题目描述:给2条线段,分别构成2个矩形,求2个矩形相交面 ...

  10. InstantClick – 快速响应!让你的网站与众不同

    尽管网络带宽不断增加,但网站并没有更快很多.这是因为最大的瓶颈在于页面加载的延迟.InstantClick 是一个很小的 JavaScript 库,大大加速你的网站响应速度. 在访问者点击一个链接之前 ...

随机推荐

  1. Codeforces Round #303 (Div. 2) C. Woodcutters 贪心

    C. Woodcutters Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/545/probl ...

  2. iOS 画圆

    _demoView = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; [self.view addSubview:_de ...

  3. Vue2.0实现双向绑定的原理

    一.几种实现双向绑定的做法 目前几种主流的mvc(vm)框架都实现了单向数据绑定,而我所理解的双向数据绑定无非就是在单向绑定的基础上给可输入元素(input.textare等)添加了change(in ...

  4. PHP 函数之 call_user_func &amp; call_user_func_array

    call_user_func_array (callable $callback, array $param_arr) 參数1: 调用一个回调函数, 參数2: 数组參数是回调函数的參数. call_u ...

  5. [Clojure] A Room-Escape game, playing with telnet and pure-text commands - Part 1

    Code path: https://github.com/bluesilence/Lisp/tree/master/clojure/projects/room-escape As I have be ...

  6. haitaolab.com 我的新网站,欢迎访问

    从博客园到csdn,再到新浪云博客,最近终于下决心购买空间和域名建立自己的独立网站! 在这里也建议希望建立自己独立博客的朋友尽快行动吧! 我的新的网站“海淘实验室”专注于介绍和分享海淘资讯,欢迎大家访 ...

  7. VS收集插件

    有空再做细细解说,大部分童鞋应该都在用1.Achievements这个就是传说中的VS成就插件了,一边编程一边解锁成就 2.Spell Checker拼写检查插件,这个插件能够实时帮你检查注释或字符串 ...

  8. 解决引用openssl静态库libcrypto.a和libssl.a出现undefined reference to错误的问题

    最近在做使用openssl链接http和https的项目,编译时出现以下问题. /usr/local/openssl/lib/libcrypto.a(async.o): In function `as ...

  9. Android宝典入门篇-进阶

    学习Android前后有快有1个月了,本着不耍流氓,谈恋爱就要结婚的信念(其实AD开发也挺有趣的),做了自己的第一个Android小应用.本来准备今天和大家分享的,考虑到在不同屏幕上的效果没测试和本着 ...

  10. Android Studio 打印调试信息

    转自:https://www.2cto.com/kf/201611/569468.html 之前开发单片机软件还是上位机都习惯使用printf(),相信很多很会有和我一样的习惯.开始学习安卓了,当然也 ...