My issue
not able to understand the question please can anyone explain me the program in detail
My code
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i=0 ; i <t ; i++){
int N = sc.nextInt();
String S = sc.next();
for(int j=0 ; j < N ; j = j+2){
if(S.charAt(j)== '0' && S.charAt(j+1) == '0'){
System.out.print("A");
}
if(S.charAt(j)== '0' && S.charAt(j+1) =='1'){
System.out.print("T");
}
if(S.charAt(j)== '1' && S.charAt(j+1) == '0'){
System.out.print("C");
}
if(S.charAt(j)== '1' && S.charAt(j+1) == '1'){
System.out.print("G");
}
}
System.out.println();
}
}
}
Learning course: Strings using Java
Problem Link: CodeChef: Practical coding for everyone