結果

問題 No.1619 Coccinellidae
ユーザー nok0nok0
提出日時 2021-07-07 16:14:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 12,880 KB
最終ジャッジ日時 2023-09-24 15:05:53
合計ジャッジ時間 3,110 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,812 KB
testcase_01 AC 103 ms
11,832 KB
testcase_02 AC 122 ms
12,864 KB
testcase_03 AC 15 ms
7,928 KB
testcase_04 AC 128 ms
12,880 KB
testcase_05 AC 76 ms
11,024 KB
testcase_06 AC 15 ms
7,780 KB
testcase_07 AC 84 ms
11,148 KB
testcase_08 AC 77 ms
10,884 KB
testcase_09 AC 16 ms
7,904 KB
testcase_10 AC 73 ms
10,460 KB
testcase_11 AC 92 ms
11,380 KB
testcase_12 AC 15 ms
7,804 KB
testcase_13 AC 122 ms
12,580 KB
testcase_14 AC 117 ms
12,852 KB
testcase_15 AC 15 ms
7,852 KB
testcase_16 AC 14 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
res = []
v = [1] * n
for i in range(n - 1, -1, -1):
    if i <= k:
        res.append(i)
        v[i] = 0
        k -= i
for i in range(n):
    if v[i]:
        res.append(i)
for i in range(n):
    if res[i] == n - 1:
        res[i] = m - (n - 1) * (n - 2) // 2
for x in res:
    print(x)
0