Submission #732973

#TimeUsernameProblemLanguageResultExecution timeMemory
732973rahulvermaProsjecni (COCI16_prosjecni)Java
24 / 120
144 ms10988 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 == 0) { 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...