結果

問題 No.1587 012 Matrix
ユーザー 👑 KazunKazun
提出日時 2021-07-08 22:38:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 82,016 KB
実行使用メモリ 80,276 KB
最終ジャッジ日時 2024-07-01 12:54:15
合計ジャッジ時間 2,494 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,308 KB
testcase_01 AC 38 ms
51,884 KB
testcase_02 AC 38 ms
51,868 KB
testcase_03 AC 37 ms
53,052 KB
testcase_04 AC 39 ms
52,704 KB
testcase_05 AC 39 ms
52,912 KB
testcase_06 AC 39 ms
53,100 KB
testcase_07 AC 38 ms
53,172 KB
testcase_08 AC 48 ms
62,520 KB
testcase_09 AC 46 ms
61,808 KB
testcase_10 AC 48 ms
63,556 KB
testcase_11 AC 50 ms
65,448 KB
testcase_12 AC 53 ms
69,988 KB
testcase_13 AC 62 ms
77,120 KB
testcase_14 AC 65 ms
76,964 KB
testcase_15 AC 69 ms
78,732 KB
testcase_16 AC 73 ms
79,396 KB
testcase_17 AC 77 ms
79,428 KB
testcase_18 AC 78 ms
79,500 KB
testcase_19 AC 78 ms
79,652 KB
testcase_20 AC 79 ms
80,276 KB
testcase_21 AC 79 ms
80,144 KB
testcase_22 AC 38 ms
52,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
M=N//2

A=[]
for i in range(N):
    if i<M:
        L=[2]*M
        R=[2]*(M-i-1)+[1]+[0]*i
    else:
        L=[2]*(M-(i-M))+[0]*(i-M)
        R=[0]*M
    A.append(L+R)

for a in A:
    print(*a,sep="")
0