結果

問題 No.5 数字のブロック
ユーザー sakuragakisakuragaki
提出日時 2017-03-21 20:22:56
言語 Perl
(5.38.2)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 225 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 5,456 KB
実行使用メモリ 7,124 KB
最終ジャッジ日時 2023-08-11 17:12:20
合計ジャッジ時間 1,932 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,064 KB
testcase_01 AC 5 ms
4,956 KB
testcase_02 AC 5 ms
4,968 KB
testcase_03 AC 11 ms
6,116 KB
testcase_04 AC 9 ms
5,896 KB
testcase_05 AC 12 ms
6,668 KB
testcase_06 AC 10 ms
6,012 KB
testcase_07 AC 9 ms
5,908 KB
testcase_08 AC 11 ms
6,192 KB
testcase_09 AC 7 ms
5,504 KB
testcase_10 AC 13 ms
6,660 KB
testcase_11 AC 9 ms
5,780 KB
testcase_12 AC 11 ms
6,344 KB
testcase_13 AC 12 ms
6,724 KB
testcase_14 AC 5 ms
4,928 KB
testcase_15 AC 5 ms
4,852 KB
testcase_16 AC 13 ms
6,676 KB
testcase_17 AC 14 ms
7,116 KB
testcase_18 AC 14 ms
6,884 KB
testcase_19 AC 14 ms
7,124 KB
testcase_20 AC 5 ms
5,048 KB
testcase_21 AC 5 ms
4,932 KB
testcase_22 AC 5 ms
4,960 KB
testcase_23 AC 5 ms
4,796 KB
testcase_24 AC 5 ms
4,976 KB
testcase_25 AC 6 ms
5,092 KB
testcase_26 AC 5 ms
4,868 KB
testcase_27 AC 5 ms
4,816 KB
testcase_28 AC 5 ms
4,928 KB
testcase_29 AC 9 ms
6,060 KB
testcase_30 AC 8 ms
5,280 KB
testcase_31 AC 5 ms
5,040 KB
testcase_32 AC 5 ms
4,920 KB
testcase_33 AC 5 ms
5,068 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;
use utf8;

chomp(my $l = <STDIN>);
chomp(my $n = <STDIN>);
chomp(my $w = <STDIN>);
my @wi = sort {$a <=> $b } split / /,$w;
my $ans = 0;
for (@wi){
    $ans++ if ($l -= $_) >= 0;
}
print $ans , "\n";
0