結果

問題 No.1587 012 Matrix
ユーザー NoneNone
提出日時 2021-09-30 12:29:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 1,000 ms
コード長 239 bytes
コンパイル時間 1,129 ms
コンパイル使用メモリ 86,708 KB
実行使用メモリ 78,800 KB
最終ジャッジ日時 2023-09-24 15:11:59
合計ジャッジ時間 5,346 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,096 KB
testcase_01 AC 71 ms
71,080 KB
testcase_02 AC 73 ms
71,228 KB
testcase_03 AC 73 ms
71,412 KB
testcase_04 AC 71 ms
71,084 KB
testcase_05 AC 72 ms
71,076 KB
testcase_06 AC 70 ms
71,036 KB
testcase_07 AC 72 ms
71,396 KB
testcase_08 AC 80 ms
76,196 KB
testcase_09 AC 78 ms
76,300 KB
testcase_10 AC 79 ms
76,344 KB
testcase_11 AC 80 ms
76,120 KB
testcase_12 AC 79 ms
76,308 KB
testcase_13 AC 83 ms
76,120 KB
testcase_14 AC 84 ms
76,584 KB
testcase_15 AC 86 ms
76,440 KB
testcase_16 AC 89 ms
76,348 KB
testcase_17 AC 91 ms
76,500 KB
testcase_18 AC 95 ms
78,496 KB
testcase_19 AC 94 ms
78,732 KB
testcase_20 AC 94 ms
78,800 KB
testcase_21 AC 93 ms
78,624 KB
testcase_22 AC 71 ms
71,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
mat=[[0]*N for _ in range(N)]
for h in range(N):
    for w in range(N):
        if h+w>=N:
            mat[h][w]=2
        if h+w==N-1 and h>=N//2:
            mat[h][w]=1
for array in mat:
    print("".join(map(str,array)))
0