結果

問題 No.115 遠足のおやつ
ユーザー gigurururugigurururu
提出日時 2014-12-28 23:52:12
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 163 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 11,380 KB
実行使用メモリ 15,412 KB
最終ジャッジ日時 2023-09-03 18:50:43
合計ジャッジ時間 5,334 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
15,268 KB
testcase_01 WA -
testcase_02 AC 69 ms
15,280 KB
testcase_03 AC 69 ms
15,128 KB
testcase_04 AC 69 ms
15,348 KB
testcase_05 AC 69 ms
15,244 KB
testcase_06 AC 69 ms
15,060 KB
testcase_07 AC 70 ms
15,280 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 73 ms
15,112 KB
testcase_14 AC 70 ms
15,160 KB
testcase_15 AC 74 ms
15,156 KB
testcase_16 AC 74 ms
15,256 KB
testcase_17 AC 71 ms
15,124 KB
testcase_18 AC 72 ms
15,156 KB
testcase_19 AC 71 ms
15,140 KB
testcase_20 AC 70 ms
15,316 KB
testcase_21 AC 69 ms
15,248 KB
testcase_22 AC 68 ms
15,048 KB
testcase_23 WA -
testcase_24 AC 70 ms
15,244 KB
testcase_25 AC 69 ms
15,268 KB
testcase_26 AC 70 ms
15,264 KB
testcase_27 AC 67 ms
15,152 KB
testcase_28 AC 69 ms
15,244 KB
testcase_29 AC 68 ms
15,268 KB
testcase_30 AC 68 ms
15,156 KB
testcase_31 AC 68 ms
15,312 KB
testcase_32 AC 71 ms
15,272 KB
testcase_33 AC 68 ms
15,268 KB
testcase_34 AC 68 ms
15,044 KB
testcase_35 AC 68 ms
15,296 KB
testcase_36 AC 67 ms
15,056 KB
testcase_37 AC 70 ms
15,296 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 73 ms
15,044 KB
testcase_41 AC 72 ms
15,096 KB
testcase_42 AC 75 ms
15,300 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,d,k=gets.split.map(&:to_i)
sum=k*(k+1)/2
diff=d-sum
puts sum>d||k>n ?-1:(k==n ?[*1..n]:[*1..k-(m=diff/(n-k))-1,k-m+(diff-m*(n-k)),*(k-m+1..k).map{|i|i+n-k}])*" "
0