結果

問題 No.279 木の数え上げ
ユーザー ねず
提出日時 2018-01-28 22:12:53
言語 PHP
(843.2)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 31,892 KB
実行使用メモリ 32,784 KB
最終ジャッジ日時 2024-12-29 16:18:19
合計ジャッジ時間 2,832 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
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