-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path61A.java
More file actions
36 lines (32 loc) · 863 Bytes
/
61A.java
File metadata and controls
36 lines (32 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Scanner;
public class 61A {
public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
String a=sc.nextLine();
String b=sc.nextLine();
char[] c=new char[a.length()];
for(int i=0;i<a.length();i++){
if(a.charAt(i)=='0'){
if(b.charAt(i)=='1'){
c[i]='1';
}
else{
c[i]='0';
}
}
else{
if(b.charAt(i)=='0'){
c[i]='1';
}
else{
c[i]='0';
}
}
}
System.out.println(c);
}
}