結果
問題 |
No.345 最小チワワ問題
|
ユーザー |
![]() |
提出日時 | 2020-07-25 08:15:15 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 202 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 6,816 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-26 20:24:31 |
合計ジャッジ時間 | 1,388 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 14 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
# use strict; # use warnings; chomp(my $S = <>); my @r; while ($S =~ /c.*?w.*?w/g) { push(@r, length(substr($S, $-[0], $+[0] - $-[0]))); } print(scalar(@r) ? (sort({$a <=> $b} @r))[0] : -1, "\n");