結果

問題 No.1619 Coccinellidae
ユーザー KudeKude
提出日時 2021-07-22 22:01:14
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 1,687 ms
コンパイル使用メモリ 86,100 KB
実行使用メモリ 88,940 KB
最終ジャッジ日時 2023-09-24 16:56:12
合計ジャッジ時間 3,909 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
70,768 KB
testcase_01 AC 98 ms
84,032 KB
testcase_02 AC 103 ms
88,940 KB
testcase_03 AC 70 ms
70,936 KB
testcase_04 AC 100 ms
86,548 KB
testcase_05 AC 92 ms
82,100 KB
testcase_06 AC 71 ms
71,052 KB
testcase_07 AC 93 ms
82,372 KB
testcase_08 AC 93 ms
83,084 KB
testcase_09 AC 70 ms
71,112 KB
testcase_10 AC 93 ms
81,000 KB
testcase_11 AC 96 ms
84,472 KB
testcase_12 AC 71 ms
71,048 KB
testcase_13 AC 102 ms
86,164 KB
testcase_14 AC 102 ms
86,940 KB
testcase_15 AC 71 ms
70,908 KB
testcase_16 AC 72 ms
70,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
d = []
for i in range(n):
    if k >= len(d):
        k -= len(d)
        d.append(i)
    else:
        d = list(range(i + 1, n)[::-1]) + d[:k] + [i] + d[k:]
        break
d.reverse()
s = sum(d)
m -= s
d[d.index(n - 1)] += m
print(*d, sep='\n')
0