結果

問題 No.1619 Coccinellidae
ユーザー AEnAEn
提出日時 2022-12-16 15:56:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 93,824 KB
最終ジャッジ日時 2024-04-27 17:08:08
合計ジャッジ時間 2,578 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,712 KB
testcase_01 AC 75 ms
89,088 KB
testcase_02 AC 82 ms
92,544 KB
testcase_03 AC 36 ms
52,096 KB
testcase_04 AC 78 ms
93,824 KB
testcase_05 AC 76 ms
85,504 KB
testcase_06 AC 36 ms
51,712 KB
testcase_07 AC 74 ms
86,016 KB
testcase_08 AC 71 ms
83,584 KB
testcase_09 AC 35 ms
51,584 KB
testcase_10 AC 63 ms
80,896 KB
testcase_11 AC 73 ms
86,528 KB
testcase_12 AC 35 ms
51,712 KB
testcase_13 AC 80 ms
93,056 KB
testcase_14 AC 80 ms
92,544 KB
testcase_15 AC 41 ms
51,968 KB
testcase_16 AC 37 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, K = map(int, input().split())
a = []
for i in range(N):
    if i<N-1:
        a.append(i)
        M -= i
    else:
        a.append(M)

p,q = [], []
for i in range(N):
    cnt = N-i-1
    if K>=cnt:
        q.append(a[i])
        K -= cnt
    else:
        p.append(a[i])
res = p+q[::-1]
print(*res,sep='\n')
0