結果

問題 No.478 一般門松列列
ユーザー kohei2019kohei2019
提出日時 2022-01-30 11:45:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 77,508 KB
最終ジャッジ日時 2023-09-02 01:30:58
合計ジャッジ時間 8,069 ms
ジャッジサーバーID
(参考情報)
judge16 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 71 ms
71,636 KB
testcase_02 WA -
testcase_03 AC 71 ms
71,468 KB
testcase_04 AC 70 ms
71,352 KB
testcase_05 AC 71 ms
71,364 KB
testcase_06 AC 71 ms
71,164 KB
testcase_07 AC 71 ms
71,436 KB
testcase_08 WA -
testcase_09 AC 72 ms
71,088 KB
testcase_10 AC 70 ms
71,456 KB
testcase_11 WA -
testcase_12 AC 82 ms
77,372 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0