hpuoj1189 Ou à
来源:互联网 发布:js方法的构造函数 编辑:程序博客网 时间:2024/04/28 03:44
点击打开链接
1189: Ou à [数学]
时间限制: 1 Sec 内存限制: 128 MB提交: 436 解决: 277 统计
题目描述
Ou à是什么东东?
华丽的分割线?233333......
Ocean的小学弟学习了新的二进制运算异或"^"。
对于
0 ^ 0 = 0,0 ^ 1 = 1,1 ^ 0 = 1,1 ^ 1 = 0
即相同为这天,Ocean的小学弟给了HPU一个等式x ^ y = z,并提出了一个问题:如果知道了
Ocean正在疯狂的debug,没有时间去思考,所以找你来帮助他的小学弟。
输入
第一行输入一个整数T T,代表有T T组测试数据。
每组数据输入两个整数y、z y、z,代表上面提到的信息。
注:1<=T<=1000,1<=y,z<=108。 1<=T<=1000,1<=y,z<=108。
每组数据输入两个整数
注:
输出
对每组测试数据,若
样例输入
21 22 3
样例输出
31
题解:这题一开始没有想到,但是后来试了一下,突然发现很简单下面是我的代码:
#include<cstdio>#include<cstring>#include<cmath>#include<cstdlib>#include<algorithm>using namespace std;int main(){int T,y,z,k,t,p;scanf("%d",&T);while(T--){scanf("%d%d",&y,&z);printf("%d\n",y^z);}return 0;}
阅读全文
0 0
- hpuoj1189 Ou à
- HPU-1189-Ou à
- 【HPU1189】Ou à [数学]
- hpu1189--Ou à(思维)
- hpuoj【1189】Ou à【数学】
- 【HPU-2016校赛-D】Ou à
- 文件服务器-OU的概念!
- Windows AD OU
- ref和ou
- Get OU and Org
- ou my god
- powershell 移动OU
- DDPG之OU过程
- 文件服务器-OU与组策略!
- EBS多组织(OU)
- Find OU and Add resp
- responsibility 查询用户,OU 职责
- 客户地点分配多OU
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- Linux内核|实验二 gcc与make使用
- localStorage相关
- Hinton Neural Networks课程笔记2e:感知机的局限性
- 没有防火墙的网络如何禁止外部访问路由器的telnet
- hpuoj1189 Ou à
- 运用BIT处理冒泡排序的交换次数问题
- whiten矩阵时报错:TypeError: cannot perform reduce with flexible type
- UIEdgeInsets 说明
- 求和(水题)
- OSPF(二)【报文】
- JQuery Ajax
- javaAPI使用kafka0.11,生产者与消费者
- “筋斗云”小案例