結果

問題 No.478 一般門松列列
ユーザー 330Xs330Xs
提出日時 2022-01-30 17:04:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 77,820 KB
最終ジャッジ日時 2023-09-02 01:41:14
合計ジャッジ時間 5,064 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,452 KB
testcase_01 AC 65 ms
71,592 KB
testcase_02 AC 67 ms
71,520 KB
testcase_03 AC 67 ms
71,528 KB
testcase_04 AC 70 ms
71,416 KB
testcase_05 AC 66 ms
71,364 KB
testcase_06 AC 66 ms
71,412 KB
testcase_07 AC 66 ms
71,492 KB
testcase_08 AC 65 ms
71,356 KB
testcase_09 AC 66 ms
71,432 KB
testcase_10 AC 64 ms
71,280 KB
testcase_11 AC 78 ms
77,744 KB
testcase_12 AC 77 ms
77,028 KB
testcase_13 AC 80 ms
77,764 KB
testcase_14 AC 80 ms
77,820 KB
testcase_15 AC 78 ms
77,316 KB
testcase_16 AC 77 ms
76,772 KB
testcase_17 AC 79 ms
77,544 KB
testcase_18 AC 77 ms
76,544 KB
testcase_19 AC 79 ms
77,476 KB
testcase_20 AC 79 ms
76,852 KB
testcase_21 AC 79 ms
76,728 KB
testcase_22 AC 77 ms
76,844 KB
testcase_23 AC 77 ms
76,504 KB
testcase_24 AC 78 ms
76,888 KB
testcase_25 AC 77 ms
77,028 KB
testcase_26 AC 76 ms
76,828 KB
testcase_27 AC 80 ms
76,776 KB
testcase_28 AC 76 ms
76,776 KB
testcase_29 AC 76 ms
76,736 KB
testcase_30 AC 78 ms
76,764 KB
testcase_31 AC 77 ms
76,788 KB
testcase_32 AC 78 ms
76,508 KB
testcase_33 AC 78 ms
76,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
ans = []
if(n - k > 2):
    for i in range((n-1)//2+1):
        ans.append(100000 + i)
        ans.append(100000 + n - i)
    
    if((n - k) % 2 == 0):
        for j in range(k):
            ans[n-k+j] = 200000 + j
    else:
        for j in range(k):
            ans[n-k+j] = 90000 - j
    print(*ans[:n])
    
else:
    ans = [i for i in range(n)]
    print(*ans)
0