結果

問題 No.1587 012 Matrix
ユーザー 👑 KazunKazun
提出日時 2021-07-08 22:38:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 81,900 KB
最終ジャッジ日時 2023-09-14 05:13:12
合計ジャッジ時間 3,348 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,284 KB
testcase_01 AC 61 ms
71,264 KB
testcase_02 AC 62 ms
71,028 KB
testcase_03 AC 61 ms
71,380 KB
testcase_04 AC 68 ms
71,460 KB
testcase_05 AC 62 ms
71,180 KB
testcase_06 AC 66 ms
71,300 KB
testcase_07 AC 62 ms
71,176 KB
testcase_08 AC 83 ms
76,416 KB
testcase_09 AC 71 ms
76,304 KB
testcase_10 AC 72 ms
76,344 KB
testcase_11 AC 72 ms
76,668 KB
testcase_12 AC 73 ms
76,852 KB
testcase_13 AC 78 ms
78,496 KB
testcase_14 AC 85 ms
78,880 KB
testcase_15 AC 85 ms
79,924 KB
testcase_16 AC 90 ms
80,520 KB
testcase_17 AC 90 ms
81,036 KB
testcase_18 AC 90 ms
80,964 KB
testcase_19 AC 92 ms
81,724 KB
testcase_20 AC 94 ms
81,896 KB
testcase_21 AC 96 ms
81,900 KB
testcase_22 AC 64 ms
71,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