結果

問題 No.5 数字のブロック
ユーザー Ken SonodaKen Sonoda
提出日時 2015-04-26 22:00:42
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 139 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 11,272 KB
実行使用メモリ 15,572 KB
最終ジャッジ日時 2023-09-18 11:50:44
合計ジャッジ時間 4,382 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,084 KB
testcase_01 AC 82 ms
15,136 KB
testcase_02 WA -
testcase_03 AC 91 ms
15,556 KB
testcase_04 AC 85 ms
15,572 KB
testcase_05 WA -
testcase_06 AC 85 ms
15,304 KB
testcase_07 AC 85 ms
15,444 KB
testcase_08 AC 85 ms
15,456 KB
testcase_09 AC 83 ms
15,088 KB
testcase_10 AC 86 ms
15,384 KB
testcase_11 AC 87 ms
15,568 KB
testcase_12 AC 87 ms
15,548 KB
testcase_13 AC 88 ms
15,496 KB
testcase_14 AC 84 ms
15,004 KB
testcase_15 WA -
testcase_16 AC 87 ms
15,396 KB
testcase_17 AC 88 ms
15,396 KB
testcase_18 AC 89 ms
15,484 KB
testcase_19 AC 90 ms
15,508 KB
testcase_20 RE -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 82 ms
15,312 KB
testcase_24 AC 82 ms
15,304 KB
testcase_25 AC 82 ms
15,088 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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
  cnt += 1
end
puts cnt.pred
0