結果

問題 No.478 一般門松列列
ユーザー H3PO4H3PO4
提出日時 2020-08-19 10:30:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 8,964 KB
最終ジャッジ日時 2023-08-02 08:39:22
合計ジャッジ時間 2,509 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,072 KB
testcase_01 AC 16 ms
8,084 KB
testcase_02 AC 16 ms
8,012 KB
testcase_03 AC 15 ms
8,048 KB
testcase_04 AC 16 ms
8,040 KB
testcase_05 AC 15 ms
8,072 KB
testcase_06 AC 15 ms
8,064 KB
testcase_07 AC 17 ms
8,160 KB
testcase_08 AC 16 ms
8,032 KB
testcase_09 AC 15 ms
8,064 KB
testcase_10 AC 15 ms
8,036 KB
testcase_11 AC 25 ms
8,812 KB
testcase_12 AC 24 ms
8,764 KB
testcase_13 AC 24 ms
8,836 KB
testcase_14 AC 25 ms
8,964 KB
testcase_15 AC 23 ms
8,820 KB
testcase_16 AC 19 ms
8,444 KB
testcase_17 AC 25 ms
8,804 KB
testcase_18 AC 22 ms
8,624 KB
testcase_19 AC 24 ms
8,960 KB
testcase_20 AC 23 ms
8,712 KB
testcase_21 AC 22 ms
8,644 KB
testcase_22 AC 19 ms
8,692 KB
testcase_23 AC 19 ms
8,564 KB
testcase_24 AC 20 ms
8,648 KB
testcase_25 AC 22 ms
8,884 KB
testcase_26 AC 17 ms
8,340 KB
testcase_27 AC 17 ms
8,380 KB
testcase_28 AC 16 ms
8,224 KB
testcase_29 AC 16 ms
8,212 KB
testcase_30 AC 20 ms
8,660 KB
testcase_31 AC 18 ms
8,476 KB
testcase_32 AC 17 ms
8,580 KB
testcase_33 AC 18 ms
8,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

N, K = map(int, input().split())

c = itertools.cycle([1, 4, 2, 3])
ans = [next(c) for _ in range(N - K)]
ans += [(5 if ans[-1] > ans[-2] else 0)] * K
print(*ans)
0