結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー dong_fengdong_feng
提出日時 2018-04-30 01:53:59
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 18,656 KB
実行使用メモリ 23,436 KB
最終ジャッジ日時 2023-09-10 08:16:35
合計ジャッジ時間 6,055 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

function countSafeBoxex($trapInput, $mouseCount){
    $safeCount = 0;
    for($i=$mouseCount;$i<strlen($trapInput);$i++){
        if($trapInput[$i]=='o') $count ++;
    }
    return $safeCount;
}

//ここから
$trapInput=fgets(STDIN);

for($i=0;$i<strlen($trapInput);$i++){
    echo countSafeBoxex($trapInput, $i)/(strlen($trapInput)-$i).PHP_EOL;
}
0