#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
if(n % 2 == 0)
{
cout<<-1<<endl;
return 0;
}
for(int i = 0; i < n; i++)
{
for(int j = 1; j <= n; j++)
cout<<i * n + j<<" ";
cout<<endl;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
2 |
Correct |
0 ms |
304 KB |
Output is correct |
3 |
Incorrect |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
0 ms |
300 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
1 ms |
304 KB |
Integer -1 violates the range [0, 1000000000] |
8 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
9 |
Incorrect |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |