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, and you can assume that only one number appear odd times.For example, there are present, and their card numbers are , , , , .so your present will be the one with the card number of , because 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 (<=n<, and n is odd) at first. Following that, n positive integers will be given in a line, all integers will smaller than ^. These numbers indicate the card numbers of the presents.n = ends the input. Output
For each case, output an integer in a line, which is the card number of your present. Sample Input Sample Output #include<stdio.h>
void main()
{
long n,x,y,i;
while(scanf("%ld",&n)== && n)
{
x=;
for(i=;i<n;i++)
{
scanf("%ld",&y);
x^=y;
}
printf("%ld\n",x);
} }

find your present的更多相关文章

  1. 跳转时候提示Attempt to present on while a presentation is in progress

    出现这种情况,例如:我在获取相册图片后,直接present到另一个页面,但是上一个页面可能还未dismiss,所以,要在获取相册图片的dismiss方法的complete的block里面写获取图片及跳 ...

  2. find your present (感叹一下位运算的神奇)

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

  3. HTTP Status 400 - Required String parameter 'userName' is not present 错误

    HTTP Status 400 - Required String parameter 'userName' is not present 错误 先mark  有时间详细写 参考链接: https:/ ...

  4. Linux 克隆虚拟机引起的“Device eth0 does not seem to be present, delaying initialization”

    虚拟机Vmware上克隆了一个Red Hat Enterprise Linx启动时发现找不到网卡,如下所示,如果你在命令窗口启动网络服务就会遇到"Device eth0 does not s ...

  5. required string parameter XXX is not present

    @RequestParam jQuery调用方式: deleteFile: function(filePath) { return ajax({ method: 'POST', url: '/cm/s ...

  6. 启动网卡报:Device eth0 does not seem to be present”解决办法

    Device eth0 does not seem to be present”解决办法 : 用ifconfig查看发现缺少eth0,只有lo:用ifconfig -a查看发现多出了eth1的信息. ...

  7. jQuery 跨域访问的三种方式 No 'Access-Control-Allow-Origin' header is present on the reque

    问题: XMLHttpRequest cannot load http://v.xxx.com. No 'Access-Control-Allow-Origin' header is present ...

  8. js跨域访问,No 'Access-Control-Allow-Origin' header is present on the requested resource

    js跨域访问提示错误:XMLHttpRequest cannot load http://...... No 'Access-Control-Allow-Origin' header is prese ...

  9. sudo: no tty present and no askpass program specified(转)

    sudo: no tty present and no askpass program specified 2012-11-30 09:30 5040人阅读 评论(1) 收藏 举报 修改sudo配置文 ...

  10. 虚拟机解决Device eth0 does not seem to be present 问题。

    Device eth0 does not seem to be present... 出现这个问题基本上是因为虚拟机是克隆的导致机器的mac网卡不一致,所以系统识别网卡失败:

随机推荐

  1. gcc编译, gdb调试, makefile写法

    //test.c: #include <stdio.h> int main(void) { printf("hello world!"); return 0; } == ...

  2. Start:at cnblogs firstDay

    C#旨在设计成为一种"简单.现代.通用",以及面向对象的程序设计语言,此种语言的实现,应提供对于以下软件工程要素的支持:强类型检查.数组维度检查.未初始化的变量引用检测.自动垃圾收 ...

  3. maven的安装与配置

    1.下载相应版本的maven安装包(压缩文件) http://maven.apache.org/download.cgi 2.环境变量配置 将下载的压缩包解压. 计算机===>属性=====&g ...

  4. SDUT 3345 数据结构实验之二叉树六:哈夫曼编码

    数据结构实验之二叉树六:哈夫曼编码 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 字符的编 ...

  5. nginx 配置.json文件直接访问

    不要弹出下载 配置nginx.conf http { include mime.types; default_type application/json;

  6. powerdesigner逆向导出oracle数据库结构显示备注

    最近接到命令,要将oracle数据库的结构导出为pdm文件供其他同事使用,逆向工程导出数据库结构比较方便,但是发现导出的数据库结构没有注释,这是很郁闷的事情: 查过网上很多资料都是sqlserver的 ...

  7. Android IOS WebRTC 音视频开发总结(四三)-- 诚信交易案例分享

    本文主要记录一些诚信交易的案例(两个陌生人之间没有合同,没有订金,没有讨价还价,完全靠诚信完成的交易), 特别纪录下来并不是因为金额有多高,而是因为在现在这种社会要完成这样的交易太难,特别是像咨询这种 ...

  8. pect-shell中的自动交互

    这是我在ST写的自动登陆ssh的脚本, 分两个文件 文件1: sssh #!/bin/bash #xql 2011/01/4#auto ssh 138.198.230.170 case $1 in & ...

  9. Transaction 'IREG', Abend 'APCT', at '????'.

    应用的问题: Transactions can fail with an APCT abend, when there is a failure in a transaction attempting ...

  10. sql查看当前周数

    select datepart(wk,cast(getdate() as datetime))