結果

問題 No.1831 Parasol
ユーザー titiatitia
提出日時 2022-02-05 04:18:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 455 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 10,968 KB
実行使用メモリ 9,740 KB
最終ジャッジ日時 2023-09-02 06:25:24
合計ジャッジ時間 2,642 ms
ジャッジサーバーID
(参考情報)
judge16 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,812 KB
testcase_01 AC 113 ms
9,688 KB
testcase_02 AC 15 ms
7,860 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 AC 114 ms
9,676 KB
testcase_05 AC 16 ms
7,992 KB
testcase_06 AC 15 ms
7,864 KB
testcase_07 AC 104 ms
9,536 KB
testcase_08 AC 15 ms
7,816 KB
testcase_09 AC 16 ms
7,944 KB
testcase_10 AC 81 ms
9,248 KB
testcase_11 AC 112 ms
9,740 KB
testcase_12 AC 54 ms
9,032 KB
testcase_13 AC 105 ms
9,688 KB
testcase_14 AC 23 ms
8,324 KB
testcase_15 AC 32 ms
8,560 KB
testcase_16 AC 16 ms
7,880 KB
testcase_17 AC 16 ms
7,816 KB
testcase_18 AC 29 ms
8,552 KB
testcase_19 AC 16 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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