結果

問題 No.279 木の数え上げ
ユーザー togaerror
提出日時 2015-09-24 21:27:37
言語 Perl
(5.40.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 9,856 KB
最終ジャッジ日時 2024-10-14 15:13:21
合計ジャッジ時間 1,185 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;

my $s = <>;
chomp $s;
my @count;


for(my $i = 0; $i < 3; $i++) {
	$count[$i] = 0;
}

$count[0] = (() = $s =~ /t/g);
$count[1] = (() = $s =~ /r/g);
$count[2] = (() = $s =~ /e/g);
$count[2] /= 2;
$count[2] = int $count[2];

@count = sort {$a <=> $b} @count;

print "$count[0]\n";

exit;
0