A7991 | Ultra-Fast Mathematician
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
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 $10^{18}$ 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 $1$ if 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.
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 $1$ if 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.
输入格式
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.
输出格式
Write one line — the corresponding answer. Do not omit the leading $0$ s.
输入输出样例
输入 #1
1010100 0100101
输出 #1
1110001
输入 #2
000 111
输出 #2
111
输入 #3
1110 1010
输出 #3
0100
输入 #4
01110 01100
输出 #4
00010
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted