結果

問題 No.836 じょうよ
ユーザー DakatanDakatan
提出日時 2019-06-17 17:18:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 148 ms / 1,000 ms
コード長 148 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 11,556 KB
実行使用メモリ 16,016 KB
最終ジャッジ日時 2023-08-18 14:13:06
合計ジャッジ時間 6,752 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
15,768 KB
testcase_01 AC 83 ms
15,140 KB
testcase_02 AC 87 ms
15,156 KB
testcase_03 AC 81 ms
15,300 KB
testcase_04 AC 83 ms
15,280 KB
testcase_05 AC 83 ms
15,188 KB
testcase_06 AC 83 ms
15,236 KB
testcase_07 AC 84 ms
15,336 KB
testcase_08 AC 84 ms
15,132 KB
testcase_09 AC 81 ms
15,260 KB
testcase_10 AC 82 ms
15,236 KB
testcase_11 AC 88 ms
15,312 KB
testcase_12 AC 90 ms
15,548 KB
testcase_13 AC 88 ms
15,544 KB
testcase_14 AC 85 ms
15,136 KB
testcase_15 AC 92 ms
15,260 KB
testcase_16 AC 143 ms
15,908 KB
testcase_17 AC 138 ms
15,660 KB
testcase_18 AC 89 ms
15,184 KB
testcase_19 AC 97 ms
15,560 KB
testcase_20 AC 119 ms
15,556 KB
testcase_21 AC 85 ms
15,048 KB
testcase_22 AC 107 ms
15,436 KB
testcase_23 AC 133 ms
15,888 KB
testcase_24 AC 87 ms
15,308 KB
testcase_25 AC 102 ms
15,632 KB
testcase_26 AC 85 ms
15,312 KB
testcase_27 AC 84 ms
15,080 KB
testcase_28 AC 87 ms
15,384 KB
testcase_29 AC 84 ms
15,184 KB
testcase_30 AC 85 ms
15,264 KB
testcase_31 AC 89 ms
15,280 KB
testcase_32 AC 89 ms
15,452 KB
testcase_33 AC 84 ms
15,280 KB
testcase_34 AC 89 ms
15,340 KB
testcase_35 AC 88 ms
15,452 KB
testcase_36 AC 111 ms
15,756 KB
testcase_37 AC 109 ms
15,568 KB
testcase_38 AC 122 ms
15,628 KB
testcase_39 AC 122 ms
15,724 KB
testcase_40 AC 148 ms
16,016 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l, r, n = gets.split(" ").map(&:to_i)
arr = Array.new(n)
arr.fill((r - l) / n)
(l % n).upto((r - l) % n + (l % n)) { |i| arr[i % n] += 1 }
puts arr
0