Submission #732974

#TimeUsernameProblemLanguageResultExecution timeMemory
732974rahulvermaProsjecni (COCI16_prosjecni)Java
24 / 120
509 ms14884 KiB
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 timeMemoryGrader output
Fetching results...