結果

問題 No.1169 Row and Column and Diagonal
ユーザー O2MTO2MT
提出日時 2020-08-14 23:27:42
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 855 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 8,288 KB
最終ジャッジ日時 2023-08-01 00:08:40
合計ジャッジ時間 3,405 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,776 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 16 ms
7,736 KB
testcase_03 AC 16 ms
7,776 KB
testcase_04 AC 16 ms
7,764 KB
testcase_05 AC 15 ms
7,740 KB
testcase_06 AC 27 ms
8,160 KB
testcase_07 AC 46 ms
8,164 KB
testcase_08 AC 65 ms
8,288 KB
testcase_09 AC 89 ms
8,148 KB
testcase_10 AC 156 ms
8,268 KB
testcase_11 AC 169 ms
8,216 KB
testcase_12 AC 176 ms
8,240 KB
testcase_13 AC 179 ms
8,208 KB
testcase_14 AC 179 ms
8,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

for i in range(N):
  yoko = [0]*N
  for j in range(N):
    yoko[j] = (2*(i+1)-(j+1))%N
    if yoko[j] == 0:
      yoko[j] = N
  print(*yoko)
0