結果

問題 No.1619 Coccinellidae
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-07-22 22:59:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 715 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 85,764 KB
最終ジャッジ日時 2023-09-24 18:47:20
合計ジャッジ時間 7,669 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from collections import deque
n,m,k = map(int,input().split())
ans = [i for i in range(n-1)]
ans.append(m-sum(ans))
ans2 = deque(ans)

now = 0
while True:
    if n-1-now < k:
        ans2.appendleft(ans2.pop())
        k -= n-1-now
        now += 1
    else:
        ans = []
        for i in range(n):
            ans.append(ans2.popleft())
        ans.insert(-k,ans.pop())
        for i in ans:
            print(i)
        exit()
0