結果

問題 No.1169 Row and Column and Diagonal
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-11 16:12:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 178 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 8,452 KB
最終ジャッジ日時 2023-09-09 17:51:29
合計ジャッジ時間 3,312 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,912 KB
testcase_01 AC 14 ms
7,832 KB
testcase_02 AC 15 ms
7,916 KB
testcase_03 AC 15 ms
7,836 KB
testcase_04 AC 15 ms
7,908 KB
testcase_05 AC 15 ms
7,944 KB
testcase_06 AC 25 ms
8,224 KB
testcase_07 AC 44 ms
8,272 KB
testcase_08 AC 66 ms
8,340 KB
testcase_09 AC 89 ms
8,192 KB
testcase_10 AC 152 ms
8,276 KB
testcase_11 AC 167 ms
8,380 KB
testcase_12 AC 178 ms
8,340 KB
testcase_13 AC 177 ms
8,452 KB
testcase_14 AC 177 ms
8,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
for i in range(n):
    ans=[]
    for j in range(n):
        tmp=(2*(i+1)-(j+1))%n
        if tmp==0:
            tmp=n
        ans.append(tmp)
    print(*ans)
0