結果

問題 No.1587 012 Matrix
ユーザー 👑 KazunKazun
提出日時 2021-07-08 22:38:13
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 251 ms
使用メモリ 86,440 KB
最終ジャッジ日時 2023-02-01 18:47:37
合計ジャッジ時間 4,137 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 82 ms
75,700 KB
testcase_01 AC 82 ms
75,492 KB
testcase_02 AC 82 ms
75,368 KB
testcase_03 AC 82 ms
75,612 KB
testcase_04 AC 82 ms
75,692 KB
testcase_05 AC 83 ms
75,624 KB
testcase_06 AC 83 ms
75,696 KB
testcase_07 AC 83 ms
75,540 KB
testcase_08 AC 95 ms
80,924 KB
testcase_09 AC 94 ms
80,804 KB
testcase_10 AC 95 ms
80,940 KB
testcase_11 AC 96 ms
81,220 KB
testcase_12 AC 100 ms
82,252 KB
testcase_13 AC 104 ms
82,632 KB
testcase_14 AC 107 ms
83,336 KB
testcase_15 AC 112 ms
84,532 KB
testcase_16 AC 115 ms
84,992 KB
testcase_17 AC 117 ms
85,240 KB
testcase_18 AC 120 ms
85,740 KB
testcase_19 AC 121 ms
86,440 KB
testcase_20 AC 121 ms
86,424 KB
testcase_21 AC 123 ms
86,180 KB
testcase_22 AC 81 ms
75,496 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