結果

問題 No.1831 Parasol
ユーザー nok0nok0
提出日時 2021-12-07 22:34:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 385 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 8,320 KB
最終ジャッジ日時 2023-09-02 04:23:24
合計ジャッジ時間 2,803 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,824 KB
testcase_01 AC 83 ms
8,312 KB
testcase_02 AC 17 ms
7,816 KB
testcase_03 AC 17 ms
7,840 KB
testcase_04 AC 83 ms
8,292 KB
testcase_05 AC 16 ms
7,824 KB
testcase_06 AC 16 ms
7,788 KB
testcase_07 AC 77 ms
8,204 KB
testcase_08 AC 16 ms
7,924 KB
testcase_09 AC 16 ms
7,840 KB
testcase_10 AC 60 ms
8,316 KB
testcase_11 AC 80 ms
8,188 KB
testcase_12 AC 42 ms
8,192 KB
testcase_13 AC 76 ms
8,316 KB
testcase_14 AC 21 ms
8,188 KB
testcase_15 AC 28 ms
8,300 KB
testcase_16 AC 16 ms
7,792 KB
testcase_17 AC 17 ms
7,840 KB
testcase_18 AC 26 ms
8,320 KB
testcase_19 AC 16 ms
7,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
print(n * 2 - 1)
ans = []
for i in range(n):
    ans.append(i * 2 + 1)
idx = 0
kep = []
cur = n * 2 - 3
for i in range(n * 2 - 2):
    print(*ans)
    if i == n - 1:
        kep = ans.copy()
    if i < n - 1:
        ans[idx] = (n - 1 - i) * 2
        idx += 1
    elif i < n * 2 - 3:
        idx -= 1
        ans[idx] = cur
        cur -= 2
if n > 1:
    print(*kep)
0