結果

問題 No.345 最小チワワ問題
ユーザー takashi2001pc
提出日時 2016-03-11 05:21:59
言語 Perl
(5.40.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 596 ms
コンパイル使用メモリ 7,808 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2024-09-25 00:02:30
合計ジャッジ時間 2,185 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;

use utf8;
use Encode qw/encode decode decode_utf8 encode_utf8 from_to/;


my $instr = decode('utf8', <STDIN>);
my $len = -1;
my $min = 100;

while($instr =~ /[c]+([^c]*?[w][^w]*?[w])(.*)/g ) {
	my $d_len = length("$1") + 1;
	$len = $d_len if( $d_len < $min );
}

print $len;
0