結果

問題 No.342 一番ワロタww
ユーザー takashi2001pctakashi2001pc
提出日時 2016-02-13 00:52:33
言語 Perl
(5.38.2)
結果
TLE  
実行時間 -
コード長 503 bytes
コンパイル時間 675 ms
コンパイル使用メモリ 7,976 KB
実行使用メモリ 12,252 KB
最終ジャッジ日時 2023-10-22 03:51:56
合計ジャッジ時間 13,188 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

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

my $cmp_str = 'w';
my $instr = '';
my $max_count = 0;
my %dat=();

$instr = decode('utf8', <STDIN>);

if( $instr ne '' ) {
	while ($instr ne '' ) {
		$instr =~ s/^(.*?)($cmp_str+)//;
		my $str = $1;
		my $str_n = $2;
		my $count = 0;
		$count++ while($str_n =~ m/$cmp_str/g);
		$max_count = $count if($max_count < $count);
		push(@{$dat{$count}}, $str) if( $str ne '' );

	}
}

foreach ( @{$dat{$max_count}} ) {
	print "$_\n";
}
0