結果

問題 No.345 最小チワワ問題
ユーザー takashi2001pc
提出日時 2016-03-11 05:11:08
言語 Perl
(5.40.0)
結果
WA  
実行時間 -
コード長 255 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 7,808 KB
実行使用メモリ 7,808 KB
最終ジャッジ日時 2024-09-24 23:59:58
合計ジャッジ時間 1,775 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;

while($instr =~ /([c][^c]*?[w][^w]*?[w])(.*)/ ) {
	$len = length("$1");
	$instr = "$2";
}

print $len;
0