We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home
  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Interview Preparation Kits
  3. 3 Months Preparation Kit
  4. Week 3
  5. XOR Strings 3

XOR Strings 3

Problem
Submissions
Leaderboard
Discussions
HackerRank Logo
|
  1. Prepare
  2. Interview Preparation Kits
  3. 3 Months Preparation Kit
  4. Week 3
  5. XOR Strings 3
Exit Full Screen View
  • Problem
  • Submissions
  • Leaderboard
  • Discussions

In this challenge, the task is to debug the existing code to successfully execute all provided test files.


Given two strings consisting of digits 0 and 1 only, find the XOR of the two strings.

To know more about XOR Click Here

Debug the given function strings_xor to find the XOR of the two given strings appropriately.

Note: You can modify at most three lines in the given code and you cannot add or remove lines to the code.

To restore the original code, click on the icon to the right of the language selector.

Input Format

The input consists of two lines. The first line of the input contains the first string, , and the second line contains the second string, .

Constraints

Output Format

Print the string obtained by the XOR of the two input strings in a single line.

Sample Input

10101
00101

Sample Output

10000

Explanation

The XOR of the two strings and is .

  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Helpdesk
  • Careers
  • Terms Of Service
  • Privacy Policy

Cookie support is required to access HackerRank

Seems like cookies are disabled on this browser, please enable them to open this website