結果

問題 No.1619 Coccinellidae
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-07-22 23:10:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 84,688 KB
最終ジャッジ日時 2023-09-24 19:10:36
合計ジャッジ時間 3,265 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,276 KB
testcase_01 AC 94 ms
82,588 KB
testcase_02 AC 98 ms
84,452 KB
testcase_03 AC 67 ms
71,056 KB
testcase_04 AC 95 ms
84,688 KB
testcase_05 AC 94 ms
81,192 KB
testcase_06 AC 70 ms
71,356 KB
testcase_07 AC 93 ms
81,520 KB
testcase_08 AC 92 ms
80,616 KB
testcase_09 AC 69 ms
71,444 KB
testcase_10 AC 91 ms
80,424 KB
testcase_11 AC 93 ms
82,016 KB
testcase_12 AC 66 ms
71,180 KB
testcase_13 AC 96 ms
84,604 KB
testcase_14 AC 99 ms
84,532 KB
testcase_15 AC 67 ms
71,320 KB
testcase_16 AC 67 ms
71,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int,input().split())
ans = [i for i in range(n-1)]
ans.append(m-sum(ans))
now = 0
if k == 0:
    for i in ans:
        print(i)
    exit()
while True:
    if n-1-now < k:
        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