Skip to content

Commit 0120fbb

Browse files
authored
61A
1 parent bb4239f commit 0120fbb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Ultra_Fast_Mathematician.cpp

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <iostream>
2+
#include <string>
3+
using namespace std;
4+
int main()
5+
{
6+
//for binary u must take input as string//
7+
string s1, s2;
8+
cin >> s1 >> s2;
9+
for (size_t i = 0; i < s1.length(); ++i)
10+
{
11+
//simple xor condition
12+
if (s1[i] == s2[i])
13+
{
14+
s1[i] = '0';
15+
}
16+
else
17+
{
18+
s1[i] = '1';
19+
}
20+
}
21+
cout << s1 << endl;
22+
return 0;
23+
}

0 commit comments

Comments
 (0)