結果

問題 No.1169 Row and Column and Diagonal
ユーザー titiatitia
提出日時 2020-08-14 21:29:08
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 10,336 KB
最終ジャッジ日時 2023-07-31 21:01:41
合計ジャッジ時間 2,681 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,784 KB
testcase_01 AC 15 ms
7,932 KB
testcase_02 AC 15 ms
7,852 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 15 ms
7,764 KB
testcase_05 AC 15 ms
7,880 KB
testcase_06 AC 26 ms
8,176 KB
testcase_07 AC 46 ms
8,544 KB
testcase_08 AC 72 ms
8,856 KB
testcase_09 AC 96 ms
9,152 KB
testcase_10 AC 173 ms
10,052 KB
testcase_11 AC 189 ms
10,056 KB
testcase_12 AC 193 ms
10,336 KB
testcase_13 AC 196 ms
10,328 KB
testcase_14 AC 201 ms
10,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[[0]*N for i in range(N)]
for i in range(1,N+1):
    for j in range(N):
        A[(i-1+j)%N][(i-1+2*j)%N]=i
for a in A:
    print(*a)
0