結果
問題 |
No.345 最小チワワ問題
|
ユーザー |
|
提出日時 | 2016-03-11 05:32:21 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 64 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 7,936 KB |
最終ジャッジ日時 | 2024-09-25 00:03:19 |
合計ジャッジ時間 | 1,741 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 8 |
コンパイルメッセージ
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][^cw]*?[w])/g ) { my $d_len = length("$1") ; if( $d_len < $min ) { $len = $d_len; $min = $d_len; } } print $len;