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.
- Prepare
- Algorithms
- Debugging
- XOR Strings
- Discussions
XOR Strings
XOR Strings
Sort by
recency
|
90 Discussions
|
Please Login in order to post a comment
C# implementation:
Compiler is saying "Wrong Answer".
As the condition said, only modified 3 lines of code to run the program. It's easy for python, but i don't know how to run in other languages.
include
using namespace std;
string strings_xor(string s, string t) {
}
int main() { string s, t; cin >> s >> t; cout << strings_xor(s, t) << endl; return 0; } ** still the compiler is saying "Wrong Answer"
the
Here is my Python solution!
Here is my c++ working solution, you can watch the explanation here : https://youtu.be/eCWFW0phR-4.
Keep in mind that it's not just about getting the right answer, it's also about making at most three changes, so an extra space on a new line will cause your code to fail, you can get a demo in the video above.
Hello, I am solving this with one line of code on JS. I am a new coder so I may be wrong somewhere. I am achieving the correct result in std.out but when i run the test is not passing me. Please let me know if i am missing anything?
process.stdin.resume(); process.stdin.setEncoding("ascii"); var input = ""; process.stdin.on("data", function (chunk) { input += chunk; }); process.stdin.on("end", function () { // now we can read/parse input console.log(Number(input.split("\n")[0]) ^ Number(input.split("\n")[1])); });
You are likely removing lines or adding new lines, which will result in a score of 0. You need to edit three lines, without adding or removing any.