-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode2.txt
More file actions
39 lines (30 loc) · 716 Bytes
/
code2.txt
File metadata and controls
39 lines (30 loc) · 716 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
37
38
39
Wordle
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=0;i<n;i++)
{
String s1=sc.next();
String s2=sc.next();
String ans=" ";
for(int j=0;j<s1.length();j++)
{
if(s1.charAt(j)==s2.charAt(j))
{
ans+='G';
}
else if(s1.charAt(j)!=s2.charAt(j))
{
ans+='B';
}
}
System.out.println(ans);
}
}
}