結果

問題 No.1169 Row and Column and Diagonal
ユーザー toyuzuko
提出日時 2020-08-15 19:30:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2024-10-10 20:32:15
合計ジャッジ時間 4,562 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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