結果

問題 No.5 数字のブロック
ユーザー mikanmikan
提出日時 2015-10-07 16:39:20
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 151 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 11,508 KB
実行使用メモリ 15,544 KB
最終ジャッジ日時 2023-09-27 07:44:42
合計ジャッジ時間 4,802 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 84 ms
15,132 KB
testcase_02 WA -
testcase_03 AC 91 ms
15,288 KB
testcase_04 WA -
testcase_05 AC 90 ms
15,524 KB
testcase_06 AC 88 ms
15,424 KB
testcase_07 AC 88 ms
15,284 KB
testcase_08 AC 88 ms
15,536 KB
testcase_09 AC 87 ms
15,088 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 89 ms
15,296 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 89 ms
15,288 KB
testcase_17 AC 89 ms
15,408 KB
testcase_18 WA -
testcase_19 AC 89 ms
15,544 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

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
0