結果

問題 No.342 一番ワロタww
ユーザー takashi2001pctakashi2001pc
提出日時 2016-02-13 00:59:26
言語 Perl
(5.38.2)
結果
TLE  
実行時間 -
コード長 563 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 7,996 KB
実行使用メモリ 12,228 KB
最終ジャッジ日時 2023-10-22 03:58:24
合計ジャッジ時間 13,049 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 strict;
use warnings;

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>);

chomp $instr;

while ( 1 ) {
	last if( $instr eq '' );
	$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 Encode::encode("utf8", $_);
	print "\n";
}

0