結果

問題 No.115 遠足のおやつ
ユーザー あかりきあかりき
提出日時 2021-02-13 13:07:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 1,645 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 71,508 KB
最終ジャッジ日時 2023-09-27 21:32:37
合計ジャッジ時間 6,723 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,144 KB
testcase_01 WA -
testcase_02 AC 68 ms
71,464 KB
testcase_03 AC 66 ms
71,236 KB
testcase_04 AC 67 ms
71,324 KB
testcase_05 AC 69 ms
71,152 KB
testcase_06 AC 64 ms
71,184 KB
testcase_07 AC 67 ms
71,232 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 67 ms
71,416 KB
testcase_14 AC 67 ms
71,468 KB
testcase_15 AC 66 ms
71,416 KB
testcase_16 AC 66 ms
71,300 KB
testcase_17 AC 65 ms
71,056 KB
testcase_18 AC 68 ms
71,108 KB
testcase_19 AC 66 ms
71,292 KB
testcase_20 AC 68 ms
71,288 KB
testcase_21 AC 65 ms
71,172 KB
testcase_22 AC 64 ms
71,168 KB
testcase_23 WA -
testcase_24 AC 65 ms
71,464 KB
testcase_25 AC 66 ms
71,172 KB
testcase_26 AC 65 ms
71,508 KB
testcase_27 AC 64 ms
71,124 KB
testcase_28 AC 65 ms
71,412 KB
testcase_29 AC 64 ms
71,128 KB
testcase_30 AC 66 ms
71,300 KB
testcase_31 AC 66 ms
71,056 KB
testcase_32 AC 67 ms
71,172 KB
testcase_33 AC 67 ms
71,468 KB
testcase_34 AC 64 ms
71,300 KB
testcase_35 AC 65 ms
71,416 KB
testcase_36 AC 66 ms
71,216 KB
testcase_37 AC 66 ms
71,208 KB
testcase_38 AC 63 ms
71,172 KB
testcase_39 WA -
testcase_40 AC 64 ms
71,236 KB
testcase_41 AC 70 ms
71,240 KB
testcase_42 AC 68 ms
71,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d,k=map(int,input().split())
if n<k:
  print(-1)
  exit()
l=[i+1 for i in range(k)]
s=sum(l)
if s>d:
  print(-1)
  exit()
x=d-s
m=n
for i in range(k-1,-1,-1):
  if m-l[i]>=x:
    l[i]+=x
    break
  else:
    x-=m-l[i]
    l[i]=m
    m-=1
for i in range(k):
  l[i]=str(l[i])
print(' '.join(l))
0