結果
問題 |
No.1831 Parasol
|
ユーザー |
![]() |
提出日時 | 2021-12-07 22:33:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 420 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-06-11 11:23:04 |
合計ジャッジ時間 | 3,983 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 3 WA * 16 |
ソースコード
n = int(input()) print(n * 2 - 1) ans = [] for i in range(n): ans.append(i * 2 + 1) idx = 0 kep = [] 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] = n - (i - n) * 2 if ans[idx] % 2 == 0: ans[idx] -= 1 if n > 1: print(*kep)