結果

問題 No.5 数字のブロック
ユーザー gemmarogemmaro
提出日時 2019-08-12 13:16:13
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 187 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 11,412 KB
実行使用メモリ 15,860 KB
最終ジャッジ日時 2023-10-13 16:45:35
合計ジャッジ時間 3,819 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,260 KB
testcase_01 AC 73 ms
15,068 KB
testcase_02 AC 71 ms
15,268 KB
testcase_03 AC 78 ms
15,500 KB
testcase_04 AC 76 ms
15,528 KB
testcase_05 AC 74 ms
15,572 KB
testcase_06 AC 78 ms
15,568 KB
testcase_07 AC 72 ms
15,368 KB
testcase_08 AC 74 ms
15,392 KB
testcase_09 AC 76 ms
15,144 KB
testcase_10 AC 75 ms
15,428 KB
testcase_11 AC 75 ms
15,324 KB
testcase_12 AC 73 ms
15,284 KB
testcase_13 AC 72 ms
15,392 KB
testcase_14 AC 69 ms
15,116 KB
testcase_15 AC 69 ms
15,116 KB
testcase_16 AC 75 ms
15,400 KB
testcase_17 AC 72 ms
15,636 KB
testcase_18 AC 77 ms
15,408 KB
testcase_19 AC 78 ms
15,860 KB
testcase_20 AC 74 ms
15,308 KB
testcase_21 AC 68 ms
15,104 KB
testcase_22 AC 70 ms
15,136 KB
testcase_23 AC 73 ms
15,220 KB
testcase_24 AC 74 ms
15,232 KB
testcase_25 AC 79 ms
15,240 KB
testcase_26 AC 76 ms
15,144 KB
testcase_27 AC 71 ms
15,044 KB
testcase_28 AC 73 ms
15,128 KB
testcase_29 AC 72 ms
15,556 KB
testcase_30 AC 75 ms
15,212 KB
testcase_31 AC 71 ms
15,040 KB
testcase_32 AC 72 ms
15,128 KB
testcase_33 AC 71 ms
15,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l={};
2.times{|i|l[i]=gets.chomp.to_i};
s=gets.chomp.split.map &:to_i;
c=0;
l=l[0];
s.sort.each{|w|l-=w;
            if l<0then p c;
                exit(0) end;
                c+=1}
p c
0