結果

問題 No.279 木の数え上げ
ユーザー ねずねず
提出日時 2018-01-28 22:12:53
言語 PHP
(8.3.4)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 11,952 KB
実行使用メモリ 13,852 KB
最終ジャッジ日時 2023-08-28 14:38:52
合計ジャッジ時間 2,118 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,192 KB
testcase_01 AC 6 ms
12,212 KB
testcase_02 AC 6 ms
12,168 KB
testcase_03 AC 7 ms
12,180 KB
testcase_04 AC 6 ms
12,204 KB
testcase_05 AC 6 ms
12,192 KB
testcase_06 AC 6 ms
12,164 KB
testcase_07 AC 6 ms
12,232 KB
testcase_08 AC 6 ms
12,148 KB
testcase_09 AC 6 ms
12,212 KB
testcase_10 AC 68 ms
13,772 KB
testcase_11 AC 20 ms
12,208 KB
testcase_12 AC 47 ms
12,212 KB
testcase_13 AC 14 ms
12,244 KB
testcase_14 AC 71 ms
13,692 KB
testcase_15 AC 60 ms
13,852 KB
testcase_16 AC 55 ms
12,252 KB
testcase_17 AC 66 ms
13,676 KB
testcase_18 AC 36 ms
12,252 KB
testcase_19 AC 65 ms
13,736 KB
testcase_20 AC 69 ms
13,732 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));
$cntT = $cntR = $cntE = 0;
for ($i = 0; $i < strlen($s); $i++) {
	if ($s[$i] == 't') {$cntT++;continue;}
	if ($s[$i] == 'r') {$cntR++;continue;}
	if ($s[$i] == 'e') {$cntE++;continue;}
}
echo min($cntT, $cntR, intval($cntE / 2));
?>
0