結果

問題 No.478 一般門松列列
ユーザー kurenai3110kurenai3110
提出日時 2017-01-28 16:41:40
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 9,772 KB
最終ジャッジ日時 2023-08-25 13:14:28
合計ジャッジ時間 3,000 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,964 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 15 ms
7,884 KB
testcase_03 AC 15 ms
7,820 KB
testcase_04 AC 15 ms
7,788 KB
testcase_05 AC 16 ms
7,856 KB
testcase_06 AC 15 ms
7,856 KB
testcase_07 AC 15 ms
7,844 KB
testcase_08 AC 16 ms
7,808 KB
testcase_09 AC 15 ms
7,852 KB
testcase_10 AC 15 ms
7,844 KB
testcase_11 AC 29 ms
9,644 KB
testcase_12 AC 26 ms
9,772 KB
testcase_13 AC 27 ms
9,632 KB
testcase_14 AC 27 ms
9,740 KB
testcase_15 AC 25 ms
9,528 KB
testcase_16 AC 20 ms
8,748 KB
testcase_17 AC 27 ms
9,484 KB
testcase_18 AC 23 ms
9,192 KB
testcase_19 AC 26 ms
9,732 KB
testcase_20 AC 24 ms
9,520 KB
testcase_21 AC 24 ms
9,236 KB
testcase_22 AC 20 ms
8,804 KB
testcase_23 AC 20 ms
8,756 KB
testcase_24 AC 21 ms
9,080 KB
testcase_25 AC 24 ms
9,476 KB
testcase_26 AC 17 ms
8,240 KB
testcase_27 AC 17 ms
8,240 KB
testcase_28 AC 17 ms
8,344 KB
testcase_29 AC 16 ms
7,840 KB
testcase_30 AC 22 ms
9,040 KB
testcase_31 AC 19 ms
8,728 KB
testcase_32 AC 18 ms
8,584 KB
testcase_33 AC 19 ms
8,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = list(map(int,input().split()))
a = []
goal = n-k
begin = 20171
r = 0
for i in range(n):
    a.append(str(begin+r))
    if i<goal-1:
        if i%2==0:
            r+=1
        r=-r
    else:
        if r>0:
            r+=1
        else:
            r-=1

print(' '.join(a))
0