結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,848 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,864 KB
testcase_03 AC 16 ms
7,852 KB
testcase_04 AC 16 ms
7,800 KB
testcase_05 AC 16 ms
7,800 KB
testcase_06 AC 16 ms
7,812 KB
testcase_07 WA -
testcase_08 AC 17 ms
7,864 KB
testcase_09 AC 16 ms
7,900 KB
testcase_10 WA -
testcase_11 AC 29 ms
8,868 KB
testcase_12 AC 35 ms
8,556 KB
testcase_13 AC 31 ms
8,728 KB
testcase_14 AC 32 ms
8,860 KB
testcase_15 AC 31 ms
8,708 KB
testcase_16 AC 22 ms
8,484 KB
testcase_17 AC 31 ms
8,736 KB
testcase_18 AC 25 ms
8,508 KB
testcase_19 WA -
testcase_20 AC 28 ms
8,484 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 27 ms
8,572 KB
testcase_25 WA -
testcase_26 AC 19 ms
8,452 KB
testcase_27 WA -
testcase_28 AC 17 ms
8,344 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 21 ms
8,412 KB
testcase_33 AC 22 ms
8,580 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):
    A[n-1-i]=A[n-1-i+1]

print(*A)
0