You are viewing a single comment's thread. Return to all comments →
using namespace std;
string strings_xor(string s, string t) {
string res = ""; for(int i = 0; i < s.length(); i++) { if(s[i] == t[i]) res.push_back('0'); else res.push_back('1'); } return res;
}
int main() { string s, t; cin >> s >> t; cout << strings_xor(s, t) << endl; return 0; } ** still the compiler is saying "Wrong Answer"
the
Seems like cookies are disabled on this browser, please enable them to open this website
XOR Strings
You are viewing a single comment's thread. Return to all comments →
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