結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
テレッテー
|
| 提出日時 | 2015-06-26 21:53:51 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 203 bytes |
| コンパイル時間 | 61 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 18,976 KB |
| 最終ジャッジ日時 | 2024-07-07 17:42:29 |
| 合計ジャッジ時間 | 6,729 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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
テレッテー