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 3
- Discussions
XOR Strings 3
XOR Strings 3
Sort by
recency
|
106 Discussions
|
Please Login in order to post a comment
Facing issues in Kotlin and Java.
Expected output: 10000 Your output: 10000
Wow!
Works in JAVA 7.
python 3 solution
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))
python 3 solution
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))
Its broken in Typescript and Javascript too, tests never pass even when its correct