結果

問題 No.1169 Row and Column and Diagonal
ユーザー KudeKude
提出日時 2020-08-14 21:31:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 78,336 KB
最終ジャッジ日時 2024-04-18 20:52:34
合計ジャッジ時間 2,414 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,328 KB
testcase_01 AC 42 ms
52,224 KB
testcase_02 AC 37 ms
51,584 KB
testcase_03 AC 41 ms
52,096 KB
testcase_04 AC 41 ms
51,840 KB
testcase_05 AC 39 ms
51,840 KB
testcase_06 AC 57 ms
66,048 KB
testcase_07 AC 66 ms
73,984 KB
testcase_08 AC 77 ms
76,800 KB
testcase_09 AC 79 ms
77,184 KB
testcase_10 AC 93 ms
77,824 KB
testcase_11 AC 96 ms
78,080 KB
testcase_12 AC 91 ms
77,824 KB
testcase_13 AC 93 ms
78,336 KB
testcase_14 AC 96 ms
78,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
d = [[0] * n for _ in range(n)]
from itertools import chain

for i, s in enumerate(chain(range(1, n + 1, 2), range(2, n + 1, 2))):
    for j, x in enumerate(range(s, s - n, -1)):
        d[j][i] = (x - 1) % n + 1
for r in d:
    print(*r)
0