Submission #732974

# Submission time Handle Problem Language Result Execution time Memory
732974 2023-04-29T22:53:27 Z rahulverma Prosjecni (COCI16_prosjecni) Java 11
24 / 120
509 ms 14884 KB
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
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.