結果

問題 No.478 一般門松列列
ユーザー titiatitia
提出日時 2023-05-29 00:05:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 8,876 KB
最終ジャッジ日時 2023-08-27 17:54:54
合計ジャッジ時間 4,333 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,940 KB
testcase_01 AC 15 ms
7,792 KB
testcase_02 AC 14 ms
7,852 KB
testcase_03 AC 14 ms
7,792 KB
testcase_04 AC 15 ms
7,852 KB
testcase_05 AC 14 ms
7,772 KB
testcase_06 AC 15 ms
7,856 KB
testcase_07 AC 14 ms
7,764 KB
testcase_08 AC 13 ms
7,800 KB
testcase_09 AC 15 ms
7,792 KB
testcase_10 AC 15 ms
7,844 KB
testcase_11 AC 27 ms
8,728 KB
testcase_12 AC 33 ms
8,548 KB
testcase_13 AC 28 ms
8,868 KB
testcase_14 AC 30 ms
8,860 KB
testcase_15 WA -
testcase_16 AC 19 ms
8,396 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 29 ms
8,808 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 22 ms
8,560 KB
testcase_23 WA -
testcase_24 AC 25 ms
8,708 KB
testcase_25 WA -
testcase_26 AC 17 ms
8,444 KB
testcase_27 AC 16 ms
8,404 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 20 ms
8,512 KB
testcase_32 WA -
testcase_33 AC 19 ms
8,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())

A=[1]*n
for i in range(n):
    if i%4==0:
        A[i]=1
    elif i%4==1:
        A[i]=1000
    elif i%4==2:
        A[i]=2
    else:
        A[i]=999

if k>0:
    A[-1]=A[-2]

for i in range(1,k+1):
    A[n-1-i]=A[n-1-i+1]

print(*A)
0