結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-07 16:39:20 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 151 bytes |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,672 KB |
| 最終ジャッジ日時 | 2024-07-20 01:52:47 |
| 合計ジャッジ時間 | 4,594 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 23 |
コンパイルメッセージ
Main.rb:8: warning: mismatched indentations at 'else' with 'if' at 6 Main.rb:11: warning: mismatched indentations at 'end' with 'else' at 8 Syntax OK
ソースコード
L=gets.to_i N=gets.to_i Ws= gets.split.map(&:to_i).sort count=0 N.times do |n| if count+n<L count+=Ws[n] else @len=n; break end end puts @len