CF61A.Ultra-Fast Mathematician
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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 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.
沙普尔是一位天赋异禀的学生。他在组合数学、代数、数论、几何、微积分等各个领域都极为出色。他不仅聪明,而且速度惊人!他能在一秒钟内完成 1018 个数的求和。
公元230年的一天,沙普尔试图探究是否有人能在计算速度上超越自己。于是,他举办了一场盛大的竞赛,并邀请所有人前来参加。
在本次竞赛中,他向参赛者提供了许多不同的数字对。每个数字均由数字 0 或 1 构成。参赛者需根据给定的数字对,写出一个新的数字。规则非常简单:结果数字的第 i 位为 1,当且仅当给定两个数字的第 i 位互不相同;否则,结果数字的第 i 位为 0。
沙普尔生成了许多这样的数字,并首先测试了自己的运算速度。他发现,对于任意长度(此处“长度”指一个数字所含的位数)的数字,哪怕长度趋于无穷(即 ∞),他也能瞬间完成这些运算!他总是给出正确答案,因此他也期望所有参赛者给出正确的答案。沙普尔为人友善,因此他不会给出过大的数字,而且他总会保证提供给每位参赛者的两个数字具有相同的长度。
现在,你将参加沙普尔举办的这场竞赛。看看你是否比他更快、更准确!
输入格式
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.
每组输入包含两行,每行包含一个数字。保证这些数字仅由 0 和 1 组成,且长度相同。这些数字可能以 0 开头。每个数字的长度不超过 100。
输出格式
Write one line — the corresponding answer. Do not omit the leading 0s.
写出一行——对应的答案。不要省略前导零。
输入输出样例
输入#1
1010100 0100101
输出#1
1110001
输入#2
000 111
输出#2
111
输入#3
1110 1010
输出#3
0100
输入#4
01110 01100
输出#4
00010
输入解题思路,AI测评打分。不知道怎么写?