結果

問題 No.1587 012 Matrix
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2021-07-09 00:10:38
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 295 bytes
コンパイル時間 269 ms
使用メモリ 83,408 KB
最終ジャッジ日時 2023-02-01 19:39:57
合計ジャッジ時間 4,226 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 83 ms
75,492 KB
testcase_01 AC 84 ms
75,496 KB
testcase_02 AC 86 ms
75,732 KB
testcase_03 AC 85 ms
75,428 KB
testcase_04 AC 86 ms
75,684 KB
testcase_05 AC 85 ms
75,660 KB
testcase_06 AC 83 ms
75,644 KB
testcase_07 AC 84 ms
75,772 KB
testcase_08 AC 88 ms
80,060 KB
testcase_09 AC 89 ms
80,836 KB
testcase_10 AC 93 ms
80,928 KB
testcase_11 AC 95 ms
80,884 KB
testcase_12 AC 95 ms
80,956 KB
testcase_13 AC 98 ms
80,888 KB
testcase_14 AC 101 ms
81,048 KB
testcase_15 AC 108 ms
82,544 KB
testcase_16 AC 109 ms
82,388 KB
testcase_17 AC 109 ms
82,696 KB
testcase_18 AC 114 ms
83,132 KB
testcase_19 AC 115 ms
82,916 KB
testcase_20 AC 115 ms
83,368 KB
testcase_21 AC 116 ms
83,408 KB
testcase_22 AC 85 ms
75,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
k=n//2
ans=[[0]*n for i in range(n)]
for i in range(k):
    for j in range(n):
        ans[i+k][j]=2
for i in range(k):
    for j in range(k):
        if i+j>=k-1:ans[i][j+k]=1
        else:
            ans[i+k][j]=1

for l in ans:
    l=list(map(str,l))
    print("".join(l))



0