結果
問題 |
No.115 遠足のおやつ
|
ユーザー |
|
提出日時 | 2015-02-10 01:53:05 |
言語 | Python2 (2.7.18) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 56 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 16:54:29 |
合計ジャッジ時間 | 1,611 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 RE * 6 |
ソースコード
N,D,K = map(int,raw_input().split()) s = range(1,K)+[D-sum(range(1,K))] if s[-2] >= s[-1]: print -1 else: for i in range(1,K): while s[-i-1] <= N-i-1 and s[-1] > N: s[-i-1] += 1; s[-1] -= 1 print " ".join(map(str,s)) if max(s) <= N else -1