結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2015-06-26 21:55:19 |
言語 | Ruby (3.4.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 204 bytes |
コンパイル時間 | 68 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 17,536 KB |
最終ジャッジ日時 | 2024-07-07 17:42:36 |
合計ジャッジ時間 | 6,659 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 31 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - number Syntax OK
ソースコード
box_width = gets.to_i number = gets.to_i blocks = gets.chomp.split(" ") blocks.sort! i = 0 width = 0 while true width += blocks[i].to_i if width > box_width break else i += 1 end end puts i