結果

問題 No.1831 Parasol
ユーザー lie_of_lillielie_of_lillie
提出日時 2022-02-16 11:50:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 9,752 KB
最終ジャッジ日時 2023-09-11 17:08:43
合計ジャッジ時間 2,670 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,856 KB
testcase_01 AC 113 ms
9,636 KB
testcase_02 AC 15 ms
7,956 KB
testcase_03 AC 16 ms
7,776 KB
testcase_04 AC 115 ms
9,628 KB
testcase_05 AC 16 ms
7,920 KB
testcase_06 AC 16 ms
7,860 KB
testcase_07 AC 109 ms
9,576 KB
testcase_08 AC 16 ms
7,924 KB
testcase_09 AC 16 ms
7,864 KB
testcase_10 AC 82 ms
9,260 KB
testcase_11 AC 112 ms
9,752 KB
testcase_12 AC 54 ms
8,828 KB
testcase_13 AC 107 ms
9,568 KB
testcase_14 AC 22 ms
8,336 KB
testcase_15 AC 33 ms
8,600 KB
testcase_16 AC 17 ms
7,756 KB
testcase_17 AC 16 ms
7,840 KB
testcase_18 AC 29 ms
8,500 KB
testcase_19 AC 16 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

ANS=[[0]*N for i in range(2*N-1)]

for i in range(N):
    x=i
    y=2*N-1-x

    if i%2==0:
        for j in range(x):
            ANS[j][i]=x
        for j in range(y):
            ANS[2*N-2-j][i]=y

    else:
        for j in range(y):
            ANS[j][i]=y
        for j in range(x):
            ANS[2*N-2-j][i]=x

print(len(ANS))

for x in ANS:
    print(*x)
0