結果

問題 No.1619 Coccinellidae
ユーザー brthyyjpbrthyyjp
提出日時 2021-09-26 18:04:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 87,352 KB
実行使用メモリ 82,656 KB
最終ジャッジ日時 2023-09-19 02:56:46
合計ジャッジ時間 4,773 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,584 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 80 ms
71,388 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 74 ms
71,492 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 81 ms
71,484 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 77 ms
71,220 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 74 ms
71,400 KB
testcase_16 AC 79 ms
71,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
A = [i for i in range(n)]
A[-1] += m-sum(A)
ans = [-1]*n
j = 0
for i, a in enumerate(A):
    if k != 0:
        if k >= n-i-1:
            ans[-1+i] = a
            k -= n-i-1
        else:
            ans[k] = a
            k = 0
    else:
        while ans[j] != -1:
            j += 1
        ans[j] = a
        j += 1
print(*ans, sep='\n')
0