結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2017-03-27 16:31:30 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 294 bytes |
コンパイル時間 | 25 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 8,988 KB |
最終ジャッジ日時 | 2024-07-06 12:15:50 |
合計ジャッジ時間 | 627 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
chomp(my $in = <STDIN>);my @ans = ();while($in > 1){if($in == 2){push @ans, 1;last;}elsif($in == 3){push @ans, 7;$in -= 3;}elsif($in > 3){push @ans, 1;$in -= 2;}}my @sorted = sort {$b <=> $a} @ans;print @sorted,"\n";