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.
- XOR Strings 2
- Discussions
XOR Strings 2
XOR Strings 2
Sort by
recency
|
193 Discussions
|
Please Login in order to post a comment
This problem is broken for C++14. I modified exactly 3 lines, it produces exactly the correct output, but the system still says "Wrong Output".
There is probably a problem with NodeJS. Although I find the desired result, I get a wrong answer warning. My code is like this.
In case you are using C++ for this problem set. Switch to C++ 11 and you should be fine.
Easy !
def strings_xor(s, t): res = "" for i in range(len(s)): if s[i] == t[i]: res+='0'; else: res+='1';
s = input() t = input() print(strings_xor(s, t))