結果

問題 No.1831 Parasol
ユーザー convexineqconvexineq
提出日時 2022-02-12 07:37:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 1,873 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 78,944 KB
最終ジャッジ日時 2023-09-10 17:42:24
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,332 KB
testcase_01 AC 112 ms
78,520 KB
testcase_02 AC 72 ms
71,300 KB
testcase_03 AC 72 ms
71,340 KB
testcase_04 AC 107 ms
78,944 KB
testcase_05 AC 74 ms
71,332 KB
testcase_06 AC 73 ms
71,204 KB
testcase_07 AC 108 ms
78,652 KB
testcase_08 AC 71 ms
71,504 KB
testcase_09 AC 73 ms
71,428 KB
testcase_10 AC 102 ms
78,236 KB
testcase_11 AC 110 ms
78,436 KB
testcase_12 AC 93 ms
77,640 KB
testcase_13 AC 107 ms
78,768 KB
testcase_14 AC 83 ms
76,528 KB
testcase_15 AC 86 ms
76,336 KB
testcase_16 AC 73 ms
71,216 KB
testcase_17 AC 71 ms
71,384 KB
testcase_18 AC 84 ms
76,500 KB
testcase_19 AC 71 ms
71,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
r = [[] for _ in range(n)]
W = 2*n-1
for i in range(n-1):
    v = W-i
    r[i].extend([v]*v)
    r[i].extend([W-v+2]*(W-v))
for i in range(3,W-v+3)[::-1]:
    r[-1].extend([i]*2)
r[-1].extend([2,2,1])

print(W)
for lst in zip(*r):
    print(*lst)
0