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();
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
118 ms |
11040 KB |
Average condition doesn't hold. |
2 |
Correct |
122 ms |
11156 KB |
Output is correct |
3 |
Incorrect |
134 ms |
10924 KB |
Average condition doesn't hold. |
4 |
Correct |
141 ms |
10936 KB |
Output is correct |
5 |
Incorrect |
133 ms |
11072 KB |
Average condition doesn't hold. |
6 |
Incorrect |
167 ms |
11484 KB |
Average condition doesn't hold. |
7 |
Incorrect |
242 ms |
11792 KB |
Average condition doesn't hold. |
8 |
Incorrect |
402 ms |
13188 KB |
Average condition doesn't hold. |
9 |
Incorrect |
362 ms |
13232 KB |
Average condition doesn't hold. |
10 |
Incorrect |
509 ms |
14884 KB |
Average condition doesn't hold. |