Algorithm


A. Ultra-Fast Mathematician
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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.

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
Copy
1010100
0100101
output
Copy
1110001
input
Copy
000
111
output
Copy
111
input
Copy
1110
1010
output
Copy
0100
input
Copy
01110
01100
output
Copy
00010



 

Code Examples

#1 Code Example with C++ Programming

Code - C++ Programming

#include<iostream>
using namespace std;

int main(){
  const int MAX = 100;
  char *a = new char[MAX];char *b = new char[MAX];char *r = new char[MAX];
  cin>>a;
  cin>>b;
  int i = 0;
  while(a[i] != '\0'){
    r[i] = ((a[i] - '0') ^ (b[i] - '0')) + '0';
    cout<<r[i];
    i++;
  }
  delete a;
  delete b;
  delete r;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
1010100
0100101

Output

x
+
cmd
1110001
Advertisements

Demonstration


Codeforcess Solution 61-A A. Ultra-Fast Mathematician ,C++, Java, Js and Python ,61-A,odeforcess Solution

Previous
Codeforces solution 1080-B-B. Margarite and the best present codeforces solution
Next
CodeChef solution DETSCORE - Determine the Score CodeChef solution C,C+