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
|
80 Discussions
|
Please Login in order to post a comment
cant solve in javascript
//Java, the website has some complie problem, the answer is correct, but it says it's wrong. public class Solution { public static void main(String args[] ) throws Exception { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ Scanner sc = new Scanner(System.in); String s1 = sc.next(); String s2 = sc.next(); String output = xor(s1,s2); System.out.println(output); }
}
C++11 (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )
You will be missing all the code if you're trying it in C#. I've re-written the problem code from the C++11 example to be similar in C#. You can copy the code below and you can only change up to 3 things.
NOTE: Tests will never pass in C#. Just run your code, check your output with what's expected in that then submit it in C++11 as the changes are the exact same!
You can browse the posts below for the answers.
PHP is also missing, i wrote my own, then doesn't accept my answer... Compiler Message Wrong Answer Input (stdin) 01010 10101 Your Output 11111Expected Output 11111