結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
dong_feng
|
| 提出日時 | 2018-04-30 02:02:04 |
| 言語 | PHP (843.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 424 bytes |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 31,044 KB |
| 実行使用メモリ | 36,612 KB |
| 最終ジャッジ日時 | 2024-06-27 23:46:07 |
| 合計ジャッジ時間 | 5,770 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 5 TLE * 1 -- * 3 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
function countSafeBoxex($trapInput, $mouseCount){
$safeCount = 0;
for($i=$mouseCount;$i<strlen($trapInput);$i++){
if($trapInput[$i]=='o') $safeCount ++;
}
return $safeCount;
}
//ここから
$trapInput=fgets(STDIN);
$trapInput = str_replace(array('\n','\r',PHP_EOL),"",$trapInput);
for($i=0;$i<strlen($trapInput);$i++){
printf("%.7f",countSafeBoxex($trapInput, $i)/(strlen($trapInput)-$i));
echo PHP_EOL;
}
dong_feng