結果

問題 No.5 数字のブロック
ユーザー neko_the_shadowneko_the_shadow
提出日時 2016-08-20 00:09:53
言語 Raku
(rakudo v2024.02)
結果
AC  
実行時間 486 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 2,546 ms
コンパイル使用メモリ 135,448 KB
実行使用メモリ 142,480 KB
最終ジャッジ日時 2024-04-29 07:43:22
合計ジャッジ時間 19,429 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 436 ms
138,400 KB
testcase_01 AC 443 ms
137,232 KB
testcase_02 AC 442 ms
138,380 KB
testcase_03 AC 460 ms
140,044 KB
testcase_04 AC 459 ms
138,364 KB
testcase_05 AC 482 ms
141,708 KB
testcase_06 AC 467 ms
139,664 KB
testcase_07 AC 462 ms
139,788 KB
testcase_08 AC 459 ms
139,660 KB
testcase_09 AC 451 ms
137,360 KB
testcase_10 AC 486 ms
142,480 KB
testcase_11 AC 464 ms
137,252 KB
testcase_12 AC 481 ms
141,584 KB
testcase_13 AC 482 ms
140,284 KB
testcase_14 AC 443 ms
138,764 KB
testcase_15 AC 445 ms
137,616 KB
testcase_16 AC 481 ms
141,208 KB
testcase_17 AC 474 ms
140,820 KB
testcase_18 AC 483 ms
141,288 KB
testcase_19 AC 474 ms
140,696 KB
testcase_20 AC 435 ms
138,508 KB
testcase_21 AC 435 ms
136,724 KB
testcase_22 AC 438 ms
136,588 KB
testcase_23 AC 438 ms
137,252 KB
testcase_24 AC 445 ms
136,708 KB
testcase_25 AC 450 ms
137,616 KB
testcase_26 AC 434 ms
138,640 KB
testcase_27 AC 443 ms
138,640 KB
testcase_28 AC 436 ms
138,384 KB
testcase_29 AC 453 ms
139,664 KB
testcase_30 AC 456 ms
139,408 KB
testcase_31 AC 436 ms
138,640 KB
testcase_32 AC 430 ms
138,640 KB
testcase_33 AC 446 ms
138,636 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

my $l = Int(get());
my $n = Int(get());
my @w = get().split(" ").map({Int($_)}).sort;

my $cnt = 0;
for @w {
    $l -= $_;
    last if $l < 0;
    $cnt++;
}

say $cnt;
0