結果

問題 No.5 数字のブロック
ユーザー Ken SonodaKen Sonoda
提出日時 2015-04-26 22:11:50
言語 Ruby
(3.2.2)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 160 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 19,556 KB
最終ジャッジ日時 2023-09-18 11:54:24
合計ジャッジ時間 8,973 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,292 KB
testcase_01 AC 83 ms
15,316 KB
testcase_02 AC 83 ms
15,216 KB
testcase_03 AC 91 ms
15,416 KB
testcase_04 AC 86 ms
15,456 KB
testcase_05 AC 88 ms
15,588 KB
testcase_06 AC 87 ms
15,344 KB
testcase_07 AC 89 ms
15,556 KB
testcase_08 AC 89 ms
15,356 KB
testcase_09 AC 87 ms
15,184 KB
testcase_10 AC 90 ms
15,536 KB
testcase_11 AC 87 ms
15,408 KB
testcase_12 AC 87 ms
15,580 KB
testcase_13 AC 87 ms
15,452 KB
testcase_14 AC 83 ms
15,164 KB
testcase_15 AC 82 ms
15,172 KB
testcase_16 AC 85 ms
15,312 KB
testcase_17 AC 88 ms
15,332 KB
testcase_18 AC 87 ms
15,536 KB
testcase_19 AC 86 ms
15,788 KB
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

L = gets.to_i
N = gets.to_i
ws = gets.split.map(&:to_i).sort

len = 0
cnt = 0
while len < L
  len += ws.shift.to_i
  cnt += 1
end
cnt -= 1 if len != L
puts cnt
0