#include <bits/stdc++.h>
using namespace std;
int n;
int main(){
ios::sync_with_stdio(false); cin.tie(0);
cin >> n;
if(n%2){
for(int i=1;i<=n*n;++i){
cout << i << " \n"[i%n==0];
}
}else{
cout << "-1\n";
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Integer -1 violates the range [0, 1000000000] |
2 |
Correct |
2 ms |
472 KB |
Output is correct |
3 |
Incorrect |
2 ms |
472 KB |
Integer -1 violates the range [0, 1000000000] |
4 |
Correct |
2 ms |
472 KB |
Output is correct |
5 |
Incorrect |
2 ms |
472 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
2 ms |
472 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
2 ms |
472 KB |
Integer -1 violates the range [0, 1000000000] |
8 |
Incorrect |
2 ms |
472 KB |
Integer -1 violates the range [0, 1000000000] |
9 |
Incorrect |
2 ms |
588 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
2 ms |
588 KB |
Integer -1 violates the range [0, 1000000000] |