結果

問題 No.836 じょうよ
ユーザー simansiman
提出日時 2020-07-17 17:18:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 165 ms / 1,000 ms
コード長 167 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 11,392 KB
実行使用メモリ 16,072 KB
最終ジャッジ日時 2023-08-19 10:30:18
合計ジャッジ時間 7,354 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
15,792 KB
testcase_01 AC 86 ms
15,020 KB
testcase_02 AC 87 ms
15,080 KB
testcase_03 AC 85 ms
15,016 KB
testcase_04 AC 84 ms
15,016 KB
testcase_05 AC 81 ms
15,092 KB
testcase_06 AC 82 ms
15,116 KB
testcase_07 AC 80 ms
15,292 KB
testcase_08 AC 80 ms
15,200 KB
testcase_09 AC 80 ms
15,016 KB
testcase_10 AC 79 ms
15,116 KB
testcase_11 AC 87 ms
15,268 KB
testcase_12 AC 90 ms
15,336 KB
testcase_13 AC 88 ms
15,232 KB
testcase_14 AC 84 ms
15,044 KB
testcase_15 AC 89 ms
15,456 KB
testcase_16 AC 146 ms
15,804 KB
testcase_17 AC 139 ms
15,888 KB
testcase_18 AC 87 ms
15,004 KB
testcase_19 AC 95 ms
15,336 KB
testcase_20 AC 119 ms
15,556 KB
testcase_21 AC 85 ms
15,124 KB
testcase_22 AC 106 ms
15,416 KB
testcase_23 AC 133 ms
15,904 KB
testcase_24 AC 92 ms
15,232 KB
testcase_25 AC 105 ms
15,384 KB
testcase_26 AC 88 ms
15,272 KB
testcase_27 AC 87 ms
15,272 KB
testcase_28 AC 88 ms
15,240 KB
testcase_29 AC 84 ms
15,288 KB
testcase_30 AC 84 ms
15,280 KB
testcase_31 AC 90 ms
15,196 KB
testcase_32 AC 88 ms
15,324 KB
testcase_33 AC 84 ms
15,020 KB
testcase_34 AC 87 ms
15,192 KB
testcase_35 AC 88 ms
15,180 KB
testcase_36 AC 115 ms
15,612 KB
testcase_37 AC 109 ms
15,680 KB
testcase_38 AC 128 ms
15,916 KB
testcase_39 AC 116 ms
15,784 KB
testcase_40 AC 165 ms
16,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

L, R, N = gets.split.map(&:to_i)

ans = Array.new(N, R / N - L / N)

(0...(L % N)).each do |i|
  ans[i] -= 1
end

(0..(R % N)).each do |i|
  ans[i] += 1
end

puts ans
0