結果

問題 No.1169 Row and Column and Diagonal
ユーザー Priyansh RathiPriyansh Rathi
提出日時 2020-08-14 22:06:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 78,720 KB
最終ジャッジ日時 2024-04-18 21:55:16
合計ジャッジ時間 2,162 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,968 KB
testcase_01 AC 41 ms
51,968 KB
testcase_02 AC 41 ms
52,224 KB
testcase_03 AC 40 ms
51,968 KB
testcase_04 AC 36 ms
52,352 KB
testcase_05 AC 41 ms
52,096 KB
testcase_06 AC 62 ms
66,432 KB
testcase_07 AC 67 ms
74,112 KB
testcase_08 AC 79 ms
76,800 KB
testcase_09 AC 83 ms
76,928 KB
testcase_10 AC 93 ms
77,824 KB
testcase_11 AC 93 ms
78,080 KB
testcase_12 AC 102 ms
78,720 KB
testcase_13 AC 102 ms
78,208 KB
testcase_14 AC 99 ms
78,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

a = list(range(1, N+1))

ans = [[0 for n in range(N)] for m in range(N)]

for i in range(N):
	x, y = i, i
	for j in range(N):
		ans[(x-j)%N][(y+j)%N] = i+1

for i in range(N):
	print(*ans[i])  	
0