結果

問題 No.1587 012 Matrix
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2021-07-09 00:10:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 1,000 ms
コード長 295 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 86,800 KB
実行使用メモリ 79,068 KB
最終ジャッジ日時 2023-09-14 05:49:49
合計ジャッジ時間 3,778 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,316 KB
testcase_01 AC 75 ms
71,208 KB
testcase_02 AC 72 ms
71,264 KB
testcase_03 AC 74 ms
71,272 KB
testcase_04 AC 74 ms
71,268 KB
testcase_05 AC 73 ms
71,368 KB
testcase_06 AC 74 ms
70,972 KB
testcase_07 AC 74 ms
71,260 KB
testcase_08 AC 79 ms
75,944 KB
testcase_09 AC 81 ms
76,260 KB
testcase_10 AC 83 ms
76,444 KB
testcase_11 AC 83 ms
76,344 KB
testcase_12 AC 85 ms
76,440 KB
testcase_13 AC 87 ms
76,368 KB
testcase_14 AC 90 ms
76,340 KB
testcase_15 AC 94 ms
78,036 KB
testcase_16 AC 97 ms
78,288 KB
testcase_17 AC 99 ms
78,728 KB
testcase_18 AC 102 ms
78,840 KB
testcase_19 AC 102 ms
78,712 KB
testcase_20 AC 104 ms
78,852 KB
testcase_21 AC 103 ms
79,068 KB
testcase_22 AC 74 ms
71,284 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