Problem description

Shapur was an extremely gifted student. He was great at everything including Combinatorics, Algebra, Number Theory, Geometry, Calculus, etc. He was not only smart but extraordinarily fast! He could manage to sum 1018 numbers in a single second.

One day in 230 AD Shapur was trying to find out if any one can possibly do calculations faster than him. As a result he made a very great contest and asked every one to come and take part.

In his contest he gave the contestants many different pairs of numbers. Each number is made from digits 0 or 1. The contestants should write a new number corresponding to the given pair of numbers. The rule is simple: The i-th digit of the answer is 1if and only if the i-th digit of the two given numbers differ. In the other case the i-th digit of the answer is 0.

Shapur made many numbers and first tried his own speed. He saw that he can perform these operations on numbers of length ∞ (length of a number is number of digits in it) in a glance! He always gives correct answers so he expects the contestants to give correct answers, too. He is a good fellow so he won't give anyone very big numbers and he always gives one person numbers of same length.

Now you are going to take part in Shapur's contest. See if you are faster and more accurate.

Input

There are two lines in each input. Each of them contains a single number. It is guaranteed that the numbers are made from 0 and 1 only and that their length is same. The numbers may start with 0. The length of each number doesn't exceed 100.

Output

Write one line — the corresponding answer. Do not omit the leading 0s.

Examples

Input

1010100
0100101

Output

1110001

Input

000
111

Output

111

Input

1110
1010

Output

0100

Input

01110
01100

Output

00010
解题思路:题目说辣么多,其实就是将两个二进制进行异或运算:相同位上的数字相同,异或结果为0,否则为1,水过!
AC代码:
 #include<bits/stdc++.h>
using namespace std;
int main(){
char s[],t[],r[];
memset(r,'\0',sizeof(r));
cin>>s>>t;
for(int i=;s[i]!='\0';++i){
if(s[i]==t[i])r[i]='';
else r[i]='';
}
cout<<r<<endl;
return ;
}
 

B - Ultra-Fast Mathematician的更多相关文章

  1. Yarn概述——FAST, RELIABLE, AND SECURE DEPENDENCY MANAGEMENT

    官网链接:https://yarnpkg.com/lang/en/ 特性 Ultra Fast. Yarn caches every package it downloads so it never ...

  2. win8.1硬盘安装ubuntu14.04双系统

    在网上找了很多方法都失败了,原因是大多数方法都是用mbr方式安装的,如grub4dos,easybcd.以至于连自己都怀疑win8能不能用硬盘安装,差点就去买个u盘来安装了,就在打算放弃的时候在ubu ...

  3. jieba.NET与Lucene.Net的集成

    首先声明:我对Lucene.Net并不熟悉,但搜索确实是分词的一个重要应用,所以这里还是尝试将两者集成起来,也许对你有一参考. 看到了两个中文分词与Lucene.Net的集成项目:Lucene.Net ...

  4. Awesome C/C++

    Awesome C/C++ A curated list of awesome C/C++ frameworks, libraries, resources, and shiny things. In ...

  5. Cheatsheet: 2013 08.14 ~ 08.19

    .NET Lucene.Net ultra fast search for MVC or WebForms site => made easy! C# State Machines HttpCl ...

  6. TE.TYCO.AMP/JST 现货资源备份库存表日志记录-2015-04-13

    行号 品牌 料号 品名规格 库存 1 molex 09-65-2028 Molex 5273-02A 600 2 tyco 103648-2 AMP 03 MTE RCPT HSG SR RIB .1 ...

  7. C/C++ 框架,类库,资源集合

    很棒的 C/C++ 框架,类库,资源集合. Awesome C/C++ Standard Libraries Frameworks Artificial Intelligence Asynchrono ...

  8. awesome cpp

    https://github.com/fffaraz/awesome-cpp Awesome C/C++ A curated list of awesome C/C++ frameworks, lib ...

  9. 【干货】国外程序员整理的 C++ 资源大全【转】

    来自 https://github.com/fffaraz/awesome-cpp A curated list of awesome C/C++ frameworks, libraries, res ...

  10. 设备管理 USB ID

    发现个USB ID站点,对于做设备管理识别的小伙伴特别实用 http://www.linux-usb.org/usb.ids 附录: # # List of USB ID's # # Maintain ...

随机推荐

  1. (转)C#开发微信门户及应用(5)--用户分组信息管理

    http://www.cnblogs.com/wuhuacong/p/3695351.html 在上个月的对C#开发微信门户及应用做了介绍,写过了几篇的随笔进行分享,由于时间关系,间隔了一段时间没有继 ...

  2. matlab学习GUI可调的界面窗口

    创建一个GUI界面,在此依然利用GUI_01的窗口来演示 发现它的最大化窗口不可调 在GUI绘制中,工具--->选择GUI选项---->选择第二个成比例 再运行就可以调控大小了

  3. springMvc学习地址新

    http://www.admin10000.com/document/6436.html 一.SpringMVC基础入门,创建一个HelloWorld程序 1.首先,导入SpringMVC需要的jar ...

  4. jmeter3.1 压测

    压测目标:error 为0,线程起到250,服务器配置达到最大 一.Jmeter3.1 压测 JMeter3.1提供一个用于生成HTML页面格式图形化报告的扩展模块.该模块支持通过两种方式生成多维度图 ...

  5. [系统资源]/proc/meminfo和free输出解释

    High Level statistics RHEL 5, RHEL 6 and RHEL 7 MemTotal: Total usable memory MemFree: The amount of ...

  6. HTTP 状态码之:301、302 重定向

    转自:http://www.cnblogs.com/5207/p/5908354.html 概念 301 Moved Permanently 被请求的资源已永久移动到新位置,并且将来任何对此资源的引用 ...

  7. visual studio2017 创建Vue项目

    1:打开Visual studio 2017后 按图片操作新建项目 也可以使用快捷键Ctrl+Shift+N  进入创建项目页面 2:选择JavaScript 里的Node.js创建对应的Vue项目 ...

  8. 实体服务器安装centos7过程记录

    一次在实体服务器安装centos 7的过程记录 第一次在实体服务器上面安装服务器(centos 7),在此记录安装过程中遇到的一些坑. 系统版本:CentOS Linux release 7.6.18 ...

  9. EditorLineEnds.ttr的困扰

    DELL的n年的商用机电脑硬盘坏了,措手不及. 256ssd+1tb企业级.机器快乐很多.一小步,让机器快了一大步. 但是2007出问题了,每次启动EditorLineEnds.ttr被占用.原来有那 ...

  10. 如鹏网JAVA培训笔记2(晓伟整理)

    输入输出: 我们使用System.out.println(“abc”);作用:向控制台输入东西. Scaner sc=new Scanner(System.in)://从输入流中去读取 int age ...