結果

問題 No.1831 Parasol
ユーザー nok0nok0
提出日時 2021-12-07 22:34:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 385 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-11 11:23:07
合計ジャッジ時間 2,226 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

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