import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan1 = new Scanner(System.in);
int test = scan1.nextInt();
String[] sArr = new String[test];
sArr[0] = "";
// String s = "";
// StringBuilder sB = new StringBuilder(s);
int y = 0;
while (test > 0) {
char c;
test--;
Scanner scan2 = new Scanner(System.in);
Scanner scan3 = new Scanner(System.in);
int n = scan2.nextInt();
String str = scan3.nextLine();
String[] nSplit = str.split("(?<=\\G.)");
int[] x = new int[n];
for (int i = 0; i < n * 4 - 3; i += 4) {
nSplit[i] += nSplit[i + 2];
nSplit[i + 1] += nSplit[i + 3];
}
for (int i = 0, j = 0; i < x.length; i++, j += 4) {
x[i] = Integer.parseInt(nSplit[j]) + Integer.parseInt(nSplit[j + 1]);
c = (char) x[i];
sArr[test] += c;
}
}
for (int i = sArr.length-1; i >-1; i--) {
System.out.println(sArr[i]);
}
}
}
input:
5
1
1234
1
2345
1
3456
1
4567
1
5678
output:
null%
null;
nullQ
nullg
} //end
where did these null come from? how to get rid of it? why is there not null next to the last element?
if null means a blank at the selected array index then what it means in this case?