結果
問題 | No.279 木の数え上げ |
ユーザー |
![]() |
提出日時 | 2015-09-22 14:57:41 |
言語 | PHP (843.2) |
結果 |
MLE
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 32,272 KB |
実行使用メモリ | 78,224 KB |
最終ジャッジ日時 | 2024-07-19 08:37:23 |
合計ジャッジ時間 | 2,541 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 MLE * 7 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php // your code goes here $S = str_split(trim(fgets(STDIN))); $str_arr = array(); for ($s=0; $s<count($S); $s++){ if (empty($str_arr[$S[$s]])){ $str_arr[$S[$s]] = 1; }else{ $str_arr[$S[$s]]++; } } $min = 0; if (isset($str_arr['r']) && isset($str_arr['t'])){ if ($str_arr['r']>=$str_arr['t']){ $min = $str_arr["t"]; }else{ $min = $str_arr["r"]; } }else{ $min = 0; } $e_min = floor( $str_arr['e'] / 2 ); $ans = 0; if ($min>=$e_min){ $ans = $e_min; }else{ $ans = $min; } echo $ans . "\n";