結果
問題 |
No.345 最小チワワ問題
|
ユーザー |
|
提出日時 | 2016-03-11 05:24:04 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 325 bytes |
コンパイル時間 | 683 ms |
コンパイル使用メモリ | 8,064 KB |
実行使用メモリ | 7,936 KB |
最終ジャッジ日時 | 2024-09-25 00:03:10 |
合計ジャッジ時間 | 2,259 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 WA * 6 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
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; if( $d_len < $min ) { $len = $d_len; $min = $d_len; } } print $len;