結果

問題 No.279 木の数え上げ
ユーザー
提出日時 2015-10-09 14:17:29
言語 PHP
(8.3.4)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 600 ms
コンパイル使用メモリ 32,144 KB
実行使用メモリ 32,780 KB
最終ジャッジ日時 2024-04-22 16:08:54
合計ジャッジ時間 2,291 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
31,332 KB
testcase_01 AC 38 ms
31,392 KB
testcase_02 AC 38 ms
31,044 KB
testcase_03 AC 40 ms
31,384 KB
testcase_04 AC 38 ms
31,212 KB
testcase_05 AC 40 ms
30,916 KB
testcase_06 AC 39 ms
30,952 KB
testcase_07 AC 39 ms
31,388 KB
testcase_08 AC 39 ms
31,048 KB
testcase_09 AC 37 ms
31,052 KB
testcase_10 AC 41 ms
32,652 KB
testcase_11 AC 39 ms
31,120 KB
testcase_12 AC 39 ms
31,884 KB
testcase_13 AC 37 ms
31,120 KB
testcase_14 AC 41 ms
32,652 KB
testcase_15 AC 40 ms
32,340 KB
testcase_16 AC 41 ms
32,268 KB
testcase_17 AC 40 ms
32,524 KB
testcase_18 AC 41 ms
31,752 KB
testcase_19 AC 42 ms
32,396 KB
testcase_20 AC 40 ms
32,780 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

const STR = 'tree';

$stdin = trim(fgets(STDIN));
$arrStr = array_count_values(str_split(STR));
$arrResult = array();

foreach ($arrStr as $key => $val) {
	if ($val === 0) {
		continue;
	}
	$arrResult[] = floor(substr_count($stdin, $key)/$val);	
}

print(min($arrResult).PHP_EOL);
0