結果

問題 No.1619 Coccinellidae
ユーザー 👑 rin204rin204
提出日時 2022-04-15 14:40:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 90,040 KB
最終ジャッジ日時 2023-08-26 05:31:40
合計ジャッジ時間 5,060 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
71,380 KB
testcase_01 WA -
testcase_02 AC 126 ms
86,264 KB
testcase_03 AC 83 ms
71,528 KB
testcase_04 WA -
testcase_05 AC 117 ms
80,820 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 120 ms
82,740 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 122 ms
82,932 KB
testcase_12 AC 84 ms
71,808 KB
testcase_13 WA -
testcase_14 AC 125 ms
82,640 KB
testcase_15 AC 84 ms
71,760 KB
testcase_16 AC 83 ms
71,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

n, m, k = map(int, input().split())
A = [i for i in range(1, n)]
A.append(m - sum(A))

lst = []
for i, a in enumerate(A):
    if k == 0:
        print(a)
    elif k > i:
        k -= i
        lst.append(a)
    else:
        i -= k
        k = 0
        for _ in range(i):
            print(lst.pop())
        print(a)
        print(*lst[::-1], sep="\n")


0