結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
___
|
| 提出日時 | 2018-02-17 10:57:20 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 88 ms / 5,000 ms |
| コード長 | 248 bytes |
| コンパイル時間 | 389 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 12,672 KB |
| 最終ジャッジ日時 | 2024-11-18 12:04:39 |
| 合計ジャッジ時間 | 4,262 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
コンパイルメッセージ
Syntax OK
ソースコード
# no.5 numeric blocks
# https://yukicoder.me/problems/no/5
box_width = gets.to_i
box_num = gets.to_i
gets.split.map(&:to_i).sort!.each_with_index{|b_w, index|
if (box_width -= b_w) < 0
puts index
return
end
}
puts box_num
___