結果
| 問題 |
No.1169 Row and Column and Diagonal
|
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2022-11-01 16:34:26 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 2,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 414 ms |
| コンパイル使用メモリ | 29,696 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-16 08:09:27 |
| 合計ジャッジ時間 | 2,120 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#include<stdio.h>
int a[502];
int main()
{
int n;
scanf("%d", &n);
int i, j;
for (i = 0; i < n; i++)
{
a[0] = 2 * i % n + 1;
for (j = 1; j < n; j++)
{
a[j] = a[j - 1] - 1;
if (a[j] == 0)
a[j] = n;
}
for (j = 0; j < n - 1; j++)
printf("%d ", a[j]);
printf("%d\n", a[j]);
}
return 0;
}
pengin_2000