結果

問題 No.1831 Parasol
ユーザー puznekopuzneko
提出日時 2022-03-04 00:57:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 567 bytes
コンパイル時間 1,335 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 78,652 KB
最終ジャッジ日時 2023-09-24 21:05:25
合計ジャッジ時間 5,530 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,308 KB
testcase_01 AC 101 ms
78,500 KB
testcase_02 AC 71 ms
71,460 KB
testcase_03 AC 72 ms
71,400 KB
testcase_04 AC 100 ms
78,544 KB
testcase_05 AC 71 ms
71,504 KB
testcase_06 AC 71 ms
71,376 KB
testcase_07 AC 99 ms
78,652 KB
testcase_08 AC 72 ms
71,464 KB
testcase_09 AC 73 ms
71,340 KB
testcase_10 AC 96 ms
78,024 KB
testcase_11 AC 99 ms
78,560 KB
testcase_12 AC 88 ms
76,200 KB
testcase_13 AC 99 ms
78,488 KB
testcase_14 AC 82 ms
76,368 KB
testcase_15 AC 85 ms
76,480 KB
testcase_16 AC 73 ms
71,248 KB
testcase_17 AC 73 ms
71,320 KB
testcase_18 AC 85 ms
76,204 KB
testcase_19 AC 72 ms
71,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
upto = n*2-1
nokorimin = 1
ans = []
for i in range(n-1):
    next = [i for i in range(upto,n*2)]
    ind = nokorimin
    while ind < upto:
        next.append(ind)
        ind += 2
    ans.append(next)
    next = [i for i in range(upto,n*2)]
    ind = nokorimin + 1
    while ind < upto:
        next.append(ind)
        ind += 2
    ans.append(next)
    upto -= 1
    nokorimin += 1

next = [i for i in range(upto,n*2)]
ans.append(next)

print("{}".format(n*2-1))
for j in range(n*2-1):
    L=[str(i) for i in ans[j]]
    L=' '.join(L)
    print(L)
0