# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
732974 | rahulverma | Prosjecni (COCI16_prosjecni) | Java | 509 ms | 14884 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
import java.io.*;
import java.util.*;
public class prosjecni {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
if(n == 2) {
System.out.println(-1);
return;
}
int c = 1;
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
System.out.print(c + " ");
c++;
}
System.out.println();
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |