結果
問題 | No.478 一般門松列列 |
ユーザー |
|
提出日時 | 2022-01-30 11:48:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 59 ms / 2,000 ms |
コード長 | 239 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 67,200 KB |
最終ジャッジ日時 | 2024-06-11 08:10:41 |
合計ジャッジ時間 | 3,004 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
N,K = map(int,input().split()) if K == N-2: print(*[1]*(N)) exit() ls = [1,3,2] for i in range(N-K-3): if ls[-2] > ls[-1]: ls.append(ls[-1]+2) else: ls.append(ls[-1]-1) ls += [ls[-1]]*(N-len(ls)) print(*ls)