結果

問題 No.1619 Coccinellidae
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-07-22 23:07:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 501 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 87,912 KB
最終ジャッジ日時 2023-09-24 19:02:16
合計ジャッジ時間 4,838 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,588 KB
testcase_01 AC 126 ms
85,248 KB
testcase_02 AC 122 ms
87,912 KB
testcase_03 WA -
testcase_04 AC 123 ms
87,844 KB
testcase_05 AC 112 ms
82,184 KB
testcase_06 AC 87 ms
71,772 KB
testcase_07 AC 114 ms
82,056 KB
testcase_08 AC 113 ms
81,584 KB
testcase_09 WA -
testcase_10 AC 109 ms
81,048 KB
testcase_11 AC 122 ms
84,724 KB
testcase_12 AC 86 ms
71,724 KB
testcase_13 AC 124 ms
87,360 KB
testcase_14 AC 123 ms
87,772 KB
testcase_15 AC 85 ms
71,432 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:
        ans3 = []
        for i in range(now):
            ans3.append(ans[-1-i])
        for i in range(now,n):
            ans3.append(ans[i-now])
        ans3.insert(-k,ans3.pop())
        for i in ans3:
            print(i)
        exit()
0