結果

問題 No.1587 012 Matrix
ユーザー convexineqconvexineq
提出日時 2021-07-09 04:50:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 1,000 ms
コード長 241 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 79,392 KB
最終ジャッジ日時 2023-09-14 06:19:08
合計ジャッジ時間 3,543 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,352 KB
testcase_01 AC 69 ms
71,316 KB
testcase_02 AC 69 ms
71,384 KB
testcase_03 AC 69 ms
71,404 KB
testcase_04 AC 69 ms
71,512 KB
testcase_05 AC 69 ms
71,404 KB
testcase_06 AC 70 ms
71,584 KB
testcase_07 AC 68 ms
71,416 KB
testcase_08 AC 72 ms
76,396 KB
testcase_09 AC 77 ms
76,752 KB
testcase_10 AC 78 ms
76,344 KB
testcase_11 AC 81 ms
76,540 KB
testcase_12 AC 81 ms
76,512 KB
testcase_13 AC 84 ms
76,880 KB
testcase_14 AC 85 ms
76,616 KB
testcase_15 AC 87 ms
76,836 KB
testcase_16 AC 87 ms
76,652 KB
testcase_17 AC 93 ms
78,968 KB
testcase_18 AC 96 ms
78,924 KB
testcase_19 AC 94 ms
79,196 KB
testcase_20 AC 94 ms
79,068 KB
testcase_21 AC 94 ms
79,392 KB
testcase_22 AC 68 ms
71,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
r = [[0]*n for _ in range(n)]
for i in range(n):
    for j in range(n):
        if i < n//2 and i+j == n-1:
            r[i][j] = 1
        elif i+j >= n:
            r[i][j] = 2

for ri in r:
    print("".join(map(str,ri)))
0