結果

問題 No.279 木の数え上げ
ユーザー togaerrortogaerror
提出日時 2015-09-24 21:27:37
言語 Perl
(5.38.2)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 5,760 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-04-22 16:05:52
合計ジャッジ時間 1,381 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,888 KB
testcase_01 AC 7 ms
5,760 KB
testcase_02 AC 6 ms
5,760 KB
testcase_03 AC 6 ms
5,760 KB
testcase_04 AC 6 ms
5,888 KB
testcase_05 AC 6 ms
5,632 KB
testcase_06 AC 6 ms
5,888 KB
testcase_07 AC 6 ms
5,888 KB
testcase_08 AC 7 ms
5,760 KB
testcase_09 AC 7 ms
5,760 KB
testcase_10 AC 25 ms
9,600 KB
testcase_11 AC 10 ms
6,656 KB
testcase_12 AC 19 ms
8,320 KB
testcase_13 AC 8 ms
6,144 KB
testcase_14 AC 27 ms
9,984 KB
testcase_15 AC 23 ms
9,216 KB
testcase_16 AC 21 ms
8,960 KB
testcase_17 AC 25 ms
9,728 KB
testcase_18 AC 16 ms
7,808 KB
testcase_19 AC 25 ms
9,600 KB
testcase_20 AC 26 ms
9,856 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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