結果

問題 No.279 木の数え上げ
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-14 21:23:35
言語 PHP
(8.3.4)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 30,624 KB
実行使用メモリ 32,396 KB
最終ジャッジ日時 2024-04-16 19:52:53
合計ジャッジ時間 2,327 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
30,876 KB
testcase_01 AC 41 ms
31,008 KB
testcase_02 AC 41 ms
31,060 KB
testcase_03 AC 41 ms
30,656 KB
testcase_04 AC 41 ms
30,576 KB
testcase_05 AC 41 ms
30,852 KB
testcase_06 AC 41 ms
30,648 KB
testcase_07 AC 41 ms
30,712 KB
testcase_08 AC 40 ms
30,852 KB
testcase_09 AC 44 ms
30,780 KB
testcase_10 AC 97 ms
32,272 KB
testcase_11 AC 53 ms
30,860 KB
testcase_12 AC 78 ms
31,760 KB
testcase_13 AC 48 ms
30,916 KB
testcase_14 AC 101 ms
32,208 KB
testcase_15 AC 91 ms
32,012 KB
testcase_16 AC 87 ms
31,628 KB
testcase_17 AC 102 ms
32,144 KB
testcase_18 AC 70 ms
31,376 KB
testcase_19 AC 95 ms
32,144 KB
testcase_20 AC 101 ms
32,396 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$S = trim(fgets(STDIN));
$t = 0;
$r = 0;
$e = 0;
for($i = 0; $i < strlen($S); $i++) {
  $n = substr($S, $i, 1);
  if($n == 't') $t++;
  if($n == 'r') $r++;
  if($n == 'e') $e++;
}
print(min($t, min($r, intdiv($e, 2))));
?>
0