結果

問題 No.1587 012 Matrix
ユーザー titiatitia
提出日時 2021-07-08 22:48:56
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 228 bytes
コンパイル時間 185 ms
使用メモリ 10,004 KB
最終ジャッジ日時 2023-02-01 18:57:44
合計ジャッジ時間 2,326 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 15 ms
7,696 KB
testcase_01 AC 15 ms
7,540 KB
testcase_02 AC 15 ms
7,524 KB
testcase_03 AC 15 ms
7,668 KB
testcase_04 AC 15 ms
7,660 KB
testcase_05 AC 15 ms
7,584 KB
testcase_06 AC 14 ms
7,604 KB
testcase_07 AC 15 ms
7,592 KB
testcase_08 AC 15 ms
7,552 KB
testcase_09 AC 15 ms
7,580 KB
testcase_10 AC 17 ms
7,784 KB
testcase_11 AC 19 ms
7,800 KB
testcase_12 AC 21 ms
8,076 KB
testcase_13 AC 25 ms
8,444 KB
testcase_14 AC 30 ms
8,432 KB
testcase_15 AC 36 ms
8,936 KB
testcase_16 AC 42 ms
9,328 KB
testcase_17 AC 47 ms
9,536 KB
testcase_18 AC 51 ms
9,680 KB
testcase_19 AC 53 ms
9,952 KB
testcase_20 AC 55 ms
10,004 KB
testcase_21 AC 55 ms
9,988 KB
testcase_22 AC 15 ms
7,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

ANS=[]
now=1
for i in range(N):
    x=now//2
    y=now%2

    X=[2]*x+[1]*y+[0]*(N-x-y)
    ANS.append(X)

    if i%2==0:
        now+=3
    else:
        now+=1

for ans in ANS:
    print("".join(map(str,ans)))
0