結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
teio
|
| 提出日時 | 2020-07-24 16:35:46 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 210 bytes |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 6,816 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-25 12:58:57 |
| 合計ジャッジ時間 | 1,251 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 21 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
# use strict;
# use warnings;
chomp(my $L = <>);
<>;
chomp(my $W = <>);
my @WS = split(/\s/, $W);
my $c = 0;
my $w = 0;
foreach (sort(@WS)) {
$w += $_;
last if $w > $L;
$c += 1;
}
print($c, "\n");
teio