結果

問題 No.5 数字のブロック
ユーザー neko_the_shadowneko_the_shadow
提出日時 2016-08-20 00:09:53
言語 Raku
(rakudo v2024.02)
結果
AC  
実行時間 466 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 1,838 ms
コンパイル使用メモリ 132,948 KB
実行使用メモリ 132,816 KB
最終ジャッジ日時 2023-08-11 15:40:56
合計ジャッジ時間 18,683 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 426 ms
132,288 KB
testcase_01 AC 425 ms
132,280 KB
testcase_02 AC 424 ms
131,928 KB
testcase_03 AC 429 ms
132,620 KB
testcase_04 AC 447 ms
132,484 KB
testcase_05 AC 462 ms
132,728 KB
testcase_06 AC 448 ms
132,756 KB
testcase_07 AC 443 ms
132,724 KB
testcase_08 AC 452 ms
132,620 KB
testcase_09 AC 439 ms
132,816 KB
testcase_10 AC 460 ms
132,424 KB
testcase_11 AC 441 ms
132,612 KB
testcase_12 AC 446 ms
132,612 KB
testcase_13 AC 461 ms
132,596 KB
testcase_14 AC 417 ms
132,436 KB
testcase_15 AC 422 ms
132,628 KB
testcase_16 AC 452 ms
132,816 KB
testcase_17 AC 457 ms
132,484 KB
testcase_18 AC 463 ms
132,724 KB
testcase_19 AC 466 ms
132,560 KB
testcase_20 AC 426 ms
132,284 KB
testcase_21 AC 405 ms
132,196 KB
testcase_22 AC 402 ms
132,188 KB
testcase_23 AC 403 ms
132,272 KB
testcase_24 AC 417 ms
132,460 KB
testcase_25 AC 422 ms
132,492 KB
testcase_26 AC 410 ms
132,192 KB
testcase_27 AC 406 ms
132,356 KB
testcase_28 AC 407 ms
132,160 KB
testcase_29 AC 426 ms
132,488 KB
testcase_30 AC 423 ms
132,664 KB
testcase_31 AC 404 ms
132,332 KB
testcase_32 AC 408 ms
132,428 KB
testcase_33 AC 407 ms
132,088 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