結果

問題 No.342 一番ワロタww
ユーザー tsunatama5tsunatama5
提出日時 2016-02-13 00:10:25
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 477 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 7,948 KB
実行使用メモリ 8,052 KB
最終ジャッジ日時 2023-10-22 03:45:15
合計ジャッジ時間 1,511 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#/usr/bin/perl
use Encode;
use utf8;
use List::Util qw/max min/;

binmode STDIN, ':encoding(utf8)';

$i = 1;
$count = 0;
$maxcount = 0;

while(<STDIN>) {
	my $inputtext = $_;
	my @text = split(/w/, $inputtext);

	foreach my $tepart(@text) {
		$count[$i] = length($tepart);
		if ($count[$i] >= $maxcount) {
			$maxcount = $count[$i];
		}
		$i++;
	}

	foreach my $tepart2(@text) {
		$telength = length($tepart2);
		if ($telength == $maxcount) {
			print "$tepart2\n";
		}
	}
}
0