結果

問題 No.1619 Coccinellidae
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-07-22 22:56:54
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 433 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 324,960 KB
最終ジャッジ日時 2023-09-24 18:41:51
合計ジャッジ時間 4,429 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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