結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
teio
|
| 提出日時 | 2020-07-24 16:35:02 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 211 bytes |
| コンパイル時間 | 375 ms |
| コンパイル使用メモリ | 6,692 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-25 12:57:56 |
| 合計ジャッジ時間 | 1,612 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 25 |
コンパイルメッセージ
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