結果

問題 No.1807 UMA Gacha
ユーザー kwkkwk
提出日時 2022-12-13 12:03:28
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 243 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 30,428 KB
実行使用メモリ 30,852 KB
最終ジャッジ日時 2024-04-24 22:47:15
合計ジャッジ時間 2,039 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
30,524 KB
testcase_01 AC 42 ms
30,772 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 41 ms
30,628 KB
testcase_05 AC 41 ms
30,488 KB
testcase_06 AC 40 ms
30,820 KB
testcase_07 AC 41 ms
30,376 KB
testcase_08 AC 40 ms
30,464 KB
testcase_09 AC 42 ms
30,720 KB
testcase_10 AC 40 ms
30,288 KB
testcase_11 AC 41 ms
30,480 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 42 ms
30,500 KB
testcase_15 AC 40 ms
30,540 KB
testcase_16 AC 41 ms
30,568 KB
testcase_17 AC 40 ms
30,404 KB
testcase_18 AC 40 ms
30,292 KB
testcase_19 AC 41 ms
30,852 KB
testcase_20 AC 40 ms
30,456 KB
testcase_21 AC 43 ms
30,724 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
$p = trim(fgets(STDIN));
$count = $p;

for ($i = 1; $i < $n; $i++) {
     $count += (1-$count)*$p;
     if($i > 200||$count >= 1){
        break;
    }
}

if($count >= 1){
    echo 1;
}else{
    echo $count;
}
?>
0