Hi,
My code seems right, but it still fails validation, can you please help to point out the error.
package en.codegym.task.pro.task05.task0511;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
/*
Creating a two-dimensional array
*/
public class Solution {
public static int[][] multiArray;
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int R = Integer.parseInt(reader.readLine());
int[][] multiArray = new int[R][];
for (int i = 0; i < R; i++) {
int n = Integer.parseInt(reader.readLine());
if (n > 0)
multiArray[i] = new int[n];
else
i--;
}
for (int i = 0; i < multiArray.length; i++) {
for (int j = 0; j < multiArray[i].length; j++) {
System.out.print(multiArray[i][j]);
}
System.out.println();
}
}
}